Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
qbox-public
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
qbox
qbox-public
Commits
0d662776
Commit
0d662776
authored
Feb 03, 2020
by
Francois Gygi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Matrix.C calc of lwork, return values
parent
a0ff3b71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
Matrix.C
src/Matrix.C
+8
-4
No files found.
src/Matrix.C
View file @
0d662776
...
...
@@ -2025,6 +2025,7 @@ double DoubleMatrix::det_from_lu(valarray<int> ipiv)
return
det
;
}
return
0
.
0
;
}
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -2041,6 +2042,7 @@ double DoubleMatrix::inverse_det(void)
inverse_from_lu
(
ipiv
);
return
det
;
}
return
0
.
0
;
}
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -2131,6 +2133,7 @@ complex<double> ComplexMatrix::det_from_lu(valarray<int> ipiv)
return
det
;
}
return
complex
<
double
>
(
0
.
0
,
0
.
0
);
}
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -2147,6 +2150,7 @@ complex<double> ComplexMatrix::inverse_det(void)
inverse_from_lu
(
ipiv
);
return
det
;
}
return
complex
<
double
>
(
0
.
0
,
0
.
0
);
}
////////////////////////////////////////////////////////////////////////////////
...
...
@@ -2814,7 +2818,7 @@ void DoubleMatrix::syev(char uplo, valarray<double>& w, DoubleMatrix& z)
z
.
val
,
&
ione
,
&
ione
,
z
.
desc_
,
&
tmpwork
,
&
lwork
,
&
info
);
lwork
=
(
int
)
(
tmpwork
+
0
.
1
);
lwork
=
(
int
)
(
tmpwork
+
1
);
double
*
work
=
new
double
[
lwork
];
pdsyev
(
&
jobz
,
&
uplo
,
&
m_
,
val
,
&
ione
,
&
ione
,
desc_
,
&
w
[
0
],
z
.
val
,
&
ione
,
&
ione
,
z
.
desc_
,
work
,
&
lwork
,
...
...
@@ -2871,7 +2875,7 @@ void DoubleMatrix::syevd(char uplo, valarray<double>& w, DoubleMatrix& z)
z
.
val
,
&
ione
,
&
ione
,
z
.
desc_
,
&
tmpwork
,
&
lwork
,
&
tmpiwork
,
&
liwork
,
&
info
);
lwork
=
(
int
)
(
tmpwork
+
0
.
1
);
lwork
=
(
int
)
(
tmpwork
+
1
);
double
*
work
=
new
double
[
lwork
];
liwork
=
tmpiwork
;
int
*
iwork
=
new
int
[
liwork
];
...
...
@@ -2943,7 +2947,7 @@ void DoubleMatrix::syevx(char uplo, valarray<double>& w, DoubleMatrix& z,
assert
(
info
==
0
);
lwork
=
(
int
)
(
tmpwork
+
0
.
1
);
lwork
=
(
int
)
(
tmpwork
+
1
);
double
*
work
=
new
double
[
lwork
];
liwork
=
tmpiwork
;
int
*
iwork
=
new
int
[
liwork
];
...
...
@@ -3061,7 +3065,7 @@ void DoubleMatrix::syevd(char uplo, valarray<double>& w)
zval
,
&
ione
,
&
ione
,
descz
,
&
tmpwork
,
&
lwork
,
&
tmpiwork
,
&
liwork
,
&
info
);
lwork
=
(
int
)
(
tmpwork
+
0
.
1
);
lwork
=
(
int
)
(
tmpwork
+
1
);
double
*
work
=
new
double
[
lwork
];
liwork
=
tmpiwork
;
int
*
iwork
=
new
int
[
liwork
];
...
...
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