Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
3rd
eigen
Commits
40aa957e
Commit
40aa957e
authored
11 years ago
by
Gael Guennebaud
Browse files
Options
Download
Email Patches
Plain Diff
Fix various scalar type conversion warnings.
parent
43029fa2
master
branches/3.2
branches/3.3
branches/Anshul-Jaiswal/update-configurevectorizationh-to-not-op-1573079916090
branches/default
3.3.7
3.3.6
3.3.5
3.3.4
3.3.3
3.3.2
3.3.1
3.3.0
3.3-rc2
3.3-rc1
3.3-beta2
3.3-beta1
3.3-alpha1
3.2.10
3.2.9
3.2.8
3.2.7
3.2.6
3.2.5
3.2.4
3.2.3
3.2.2
3.2.1
3.2.0
3.2-rc2
3.2-rc1
before-evaluators
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
Eigen/src/QR/ColPivHouseholderQR.h
+2
-2
Eigen/src/QR/ColPivHouseholderQR.h
Eigen/src/SparseLU/SparseLU_pruneL.h
+1
-1
Eigen/src/SparseLU/SparseLU_pruneL.h
test/geo_quaternion.cpp
+2
-2
test/geo_quaternion.cpp
test/sizeof.cpp
+1
-1
test/sizeof.cpp
test/sparse.h
+2
-2
test/sparse.h
test/sparse_basic.cpp
+8
-8
test/sparse_basic.cpp
with
16 additions
and
16 deletions
+16
-16
Eigen/src/QR/ColPivHouseholderQR.h
View file @
40aa957e
...
...
@@ -525,8 +525,8 @@ struct solve_retval<ColPivHouseholderQR<_MatrixType>, Rhs>
{
eigen_assert
(
rhs
().
rows
()
==
dec
().
rows
());
const
int
cols
=
dec
().
cols
(),
nonzero_pivots
=
dec
().
nonzeroPivots
();
const
Index
cols
=
dec
().
cols
(),
nonzero_pivots
=
dec
().
nonzeroPivots
();
if
(
nonzero_pivots
==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
Eigen/src/SparseLU/SparseLU_pruneL.h
View file @
40aa957e
...
...
@@ -56,7 +56,7 @@ void SparseLUImpl<Scalar,Index>::pruneL(const Index jcol, const IndexVector& per
Index
jsupno
=
glu
.
supno
(
jcol
);
Index
i
,
irep
,
irep1
;
bool
movnum
,
do_prune
=
false
;
Index
kmin
,
kmax
,
minloc
,
maxloc
,
krow
;
Index
kmin
=
0
,
kmax
=
0
,
minloc
,
maxloc
,
krow
;
for
(
i
=
0
;
i
<
nseg
;
i
++
)
{
irep
=
segrep
(
i
);
...
...
This diff is collapsed.
Click to expand it.
test/geo_quaternion.cpp
View file @
40aa957e
...
...
@@ -32,7 +32,7 @@ template<typename QuatType> void check_slerp(const QuatType& q0, const QuatType&
Scalar
theta_tot
=
AA
(
q1
*
q0
.
inverse
()).
angle
();
if
(
theta_tot
>
M_PI
)
theta_tot
=
Scalar
(
2.
*
M_PI
)
-
theta_tot
;
for
(
Scalar
t
=
0
;
t
<=
1.001
;
t
+=
0.1
)
for
(
Scalar
t
=
0
;
t
<=
Scalar
(
1.001
)
;
t
+=
Scalar
(
0.1
)
)
{
QuatType
q
=
q0
.
slerp
(
t
,
q1
);
Scalar
theta
=
AA
(
q
*
q0
.
inverse
()).
angle
();
...
...
@@ -156,7 +156,7 @@ template<typename Scalar, int Options> void quaternion(void)
check_slerp
(
q1
,
q2
);
q1
=
AngleAxisx
(
b
,
v1
.
normalized
());
q2
=
AngleAxisx
(
b
+
M_PI
,
v1
.
normalized
());
q2
=
AngleAxisx
(
b
+
Scalar
(
M_PI
)
,
v1
.
normalized
());
check_slerp
(
q1
,
q2
);
q1
=
AngleAxisx
(
b
,
v1
.
normalized
());
...
...
This diff is collapsed.
Click to expand it.
test/sizeof.cpp
View file @
40aa957e
...
...
@@ -13,7 +13,7 @@ template<typename MatrixType> void verifySizeOf(const MatrixType&)
{
typedef
typename
MatrixType
::
Scalar
Scalar
;
if
(
MatrixType
::
RowsAtCompileTime
!=
Dynamic
&&
MatrixType
::
ColsAtCompileTime
!=
Dynamic
)
VERIFY
(
sizeof
(
MatrixType
)
==
sizeof
(
Scalar
)
*
std
::
ptrdiff_t
(
MatrixType
::
SizeAtCompileTime
));
VERIFY
(
std
::
ptrdiff_t
(
sizeof
(
MatrixType
)
)
==
std
::
ptrdiff_t
(
sizeof
(
Scalar
)
)
*
std
::
ptrdiff_t
(
MatrixType
::
SizeAtCompileTime
));
else
VERIFY
(
sizeof
(
MatrixType
)
==
sizeof
(
Scalar
*
)
+
2
*
sizeof
(
typename
MatrixType
::
Index
));
}
...
...
This diff is collapsed.
Click to expand it.
test/sparse.h
View file @
40aa957e
...
...
@@ -66,10 +66,10 @@ initSparse(double density,
//sparseMat.reserve(int(refMat.rows()*refMat.cols()*density));
sparseMat
.
reserve
(
VectorXi
::
Constant
(
IsRowMajor
?
refMat
.
rows
()
:
refMat
.
cols
(),
int
((
1.5
*
density
)
*
(
IsRowMajor
?
refMat
.
cols
()
:
refMat
.
rows
()))));
for
(
int
j
=
0
;
j
<
sparseMat
.
outerSize
();
j
++
)
for
(
Index
j
=
0
;
j
<
sparseMat
.
outerSize
();
j
++
)
{
//sparseMat.startVec(j);
for
(
int
i
=
0
;
i
<
sparseMat
.
innerSize
();
i
++
)
for
(
Index
i
=
0
;
i
<
sparseMat
.
innerSize
();
i
++
)
{
int
ai
(
i
),
aj
(
j
);
if
(
IsRowMajor
)
...
...
This diff is collapsed.
Click to expand it.
test/sparse_basic.cpp
View file @
40aa957e
...
...
@@ -449,12 +449,12 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re
// test conservative resize
{
std
::
vector
<
std
::
pair
<
int
,
int
>
>
inc
;
inc
.
push_back
(
std
::
pair
<
int
,
int
>
(
-
3
,
-
2
));
inc
.
push_back
(
std
::
pair
<
int
,
int
>
(
0
,
0
));
inc
.
push_back
(
std
::
pair
<
int
,
int
>
(
3
,
2
));
inc
.
push_back
(
std
::
pair
<
int
,
int
>
(
3
,
0
));
inc
.
push_back
(
std
::
pair
<
int
,
int
>
(
0
,
3
));
std
::
vector
<
std
::
pair
<
Index
,
Index
>
>
inc
;
inc
.
push_back
(
std
::
pair
<
Index
,
Index
>
(
-
3
,
-
2
));
inc
.
push_back
(
std
::
pair
<
Index
,
Index
>
(
0
,
0
));
inc
.
push_back
(
std
::
pair
<
Index
,
Index
>
(
3
,
2
));
inc
.
push_back
(
std
::
pair
<
Index
,
Index
>
(
3
,
0
));
inc
.
push_back
(
std
::
pair
<
Index
,
Index
>
(
0
,
3
));
for
(
size_t
i
=
0
;
i
<
inc
.
size
();
i
++
)
{
Index
incRows
=
inc
[
i
].
first
;
...
...
@@ -472,9 +472,9 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re
// Insert new values
if
(
incRows
>
0
)
m1
.
insert
(
refMat
1
.
rows
()
-
1
,
0
)
=
refMat1
(
refMat1
.
rows
()
-
1
,
0
)
=
1
;
m1
.
insert
(
m
1
.
rows
()
-
1
,
0
)
=
refMat1
(
refMat1
.
rows
()
-
1
,
0
)
=
1
;
if
(
incCols
>
0
)
m1
.
insert
(
0
,
refMat
1
.
cols
()
-
1
)
=
refMat1
(
0
,
refMat1
.
cols
()
-
1
)
=
1
;
m1
.
insert
(
0
,
m
1
.
cols
()
-
1
)
=
refMat1
(
0
,
refMat1
.
cols
()
-
1
)
=
1
;
VERIFY_IS_APPROX
(
m1
,
refMat1
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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
Menu
Projects
Groups
Snippets
Help