"examples/pytorch/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "3c387988d7addc4a6b92785c12b64566d164bb55"
Commit 2f899eeb authored by Davis King's avatar Davis King
Browse files

Switched the eigenvalue_decomposition from using syev to syevr since

syevr is supposed to be better.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403871
parent 916b159a
...@@ -179,9 +179,16 @@ namespace dlib ...@@ -179,9 +179,16 @@ namespace dlib
#ifdef DLIB_USE_LAPACK #ifdef DLIB_USE_LAPACK
e = 0; e = 0;
// I would use syevr but the last time I checked there was a bug in the
// Intel MKL's implementation of syevr. // We could compute the result using syev()
lapack::syev('V', 'L', V, d); //lapack::syev('V', 'L', V, d);
// Instead, we use syevr because its faster and maybe more stable.
matrix_type tempA(A);
matrix<lapack::integer,0,0,mem_manager_type,layout_type> isupz;
lapack::integer temp;
lapack::syevr('V','A','L',tempA,0,0,0,0,-1,temp,d,V,isupz);
#else #else
// Tridiagonalize. // Tridiagonalize.
tred2(); tred2();
...@@ -246,9 +253,17 @@ namespace dlib ...@@ -246,9 +253,17 @@ namespace dlib
#ifdef DLIB_USE_LAPACK #ifdef DLIB_USE_LAPACK
e = 0; e = 0;
// I would use syevr but the last time I checked there was a bug in the
// Intel MKL's implementation of syevr. // We could compute the result using syev()
lapack::syev('V', 'L', V, d); //lapack::syev('V', 'L', V, d);
// Instead, we use syevr because its faster and maybe more stable.
matrix_type tempA(A);
matrix<lapack::integer,0,0,mem_manager_type,layout_type> isupz;
lapack::integer temp;
lapack::syevr('V','A','L',tempA,0,0,0,0,-1,temp,d,V,isupz);
#else #else
// Tridiagonalize. // Tridiagonalize.
tred2(); tred2();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment