Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
soth
Commits
cb56f911
Commit
cb56f911
authored
Dec 06, 2017
by
Joseph Mirabel
Committed by
Joseph Mirabel
Dec 06, 2017
Browse files
Update SubMatrix.hpp
parent
bc7c2970
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/SubMatrix.hpp
View file @
cb56f911
...
...
@@ -35,7 +35,12 @@ namespace Eigen
ColsAtCompileTime
=
(
PermutationType
==
RowPermutation
)
?
(
MatrixType
::
ColsAtCompileTime
)
:
Dynamic
,
MaxRowsAtCompileTime
=
(
IsSub
?
MatrixType
::
MaxRowsAtCompileTime
:
Dynamic
),
MaxColsAtCompileTime
=
(
IsSub
?
MatrixType
::
MaxColsAtCompileTime
:
Dynamic
),
Flags
=
(
MatrixType
::
Flags
&
HereditaryBits
)
|
ei_compute_lvalue_bit
<
MatrixType
>::
ret
|
LinearAccessBit
VectorAtCompileTime
=
(
RowsAtCompileTime
==
1
)
||
(
ColsAtCompileTime
==
1
),
Flags
=
(
(
MatrixType
::
Flags
&
HereditaryBits
)
|
ei_compute_lvalue_bit
<
MatrixType
>::
ret
|
(
VectorAtCompileTime
?
LinearAccessBit
:
0
)
)
&
(
VectorAtCompileTime
?
~
0
:
~
LinearAccessBit
)
};
};
...
...
@@ -45,17 +50,17 @@ namespace Eigen
{
typedef
SubMatrix
<
MatrixType
,
PermutationType
,
IsSub
>
XprType
;
typedef
typename
MatrixType
::
Scalar
Scalar
;
typedef
typename
nested_eval
<
MatrixType
,
PermutationType
>::
type
MatrixTypeNested
;
typedef
typename
nested_eval
<
MatrixType
,
1
>::
type
MatrixTypeNested
;
typedef
typename
remove_all
<
MatrixTypeNested
>::
type
MatrixTypeNestedCleaned
;
typedef
typename
XprType
::
CoeffReturnType
CoeffReturnType
;
typedef
typename
SubMatrix
<
MatrixType
,
PermutationType
,
IsSub
>::
MemoryBase
MemoryBase
;
enum
{
CoeffReadCost
=
evaluator
<
MatrixTypeNestedCleaned
>::
CoeffReadCost
,
Flags
=
Matrix
Type
::
Flags
|
LinearAccessBit
Flags
=
Xpr
Type
::
Flags
};
evaluator
(
const
XprType
&
xpr
)
:
m_argImpl
(
xpr
.
m_matrix
)
:
m_argImpl
(
xpr
)
{
}
inline
CoeffReturnType
coeff
(
Index
row
,
Index
col
)
const
...
...
@@ -78,7 +83,8 @@ namespace Eigen
return
m_argImpl
.
coeffRef
(
row
);
}
evaluator
<
MatrixTypeNestedCleaned
>
m_argImpl
;
// evaluator<MatrixTypeNestedCleaned> m_argImpl;
const
XprType
&
m_argImpl
;
};
}
...
...
@@ -760,7 +766,8 @@ namespace Eigen
typedef
typename
XprType
::
CoeffReturnType
CoeffReturnType
;
enum
{
CoeffReadCost
=
evaluator
<
MatrixType1
>::
CoeffReadCost
,
Flags
=
Eigen
::
ColMajor
Flags
=
((
MatrixType1
::
Flags
&
HereditaryBits
)
|
ei_compute_lvalue_bit
<
MatrixType1
>::
ret
)
&
~
LinearAccessBit
};
evaluator
(
const
XprType
&
xpr
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment