• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisiónda0cf79a76371e372912d79ed834632590ed30e8 (tree)
Tiempo2013-07-12 13:15:23
AutorKatsuhiko Nishimra <ktns.87@gmai...>
CommiterKatsuhiko Nishimra

Log Message

Add LapackInfo key value pair into Exception. #31712

git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@1385 1136aad2-a195-0410-b898-f5ea1d11b9d8

Cambiar Resumen

Diferencia incremental

--- a/src/base/Enums.h
+++ b/src/base/Enums.h
@@ -152,6 +152,11 @@ RENUMSTR_BEGIN( MultipoleType, MultipoleTypeStr )
152152 RENUMSTR( MultipoleType_end, "MultipoleType_end" )
153153 RENUMSTR_END()
154154
155+RENUMSTR_BEGIN( ExceptionKey, ExceptionKeyStr )
156+ RENUMSTR( LapackInfo, "LapackInfo" )
157+ RENUMSTR( ExceptionKey_end, "ExceptionKey_end" )
158+RENUMSTR_END()
159+
155160 }
156161 #endif
157162
--- a/src/wrappers/Lapack.cpp
+++ b/src/wrappers/Lapack.cpp
@@ -37,6 +37,7 @@
3737 #include"../base/PrintController.h"
3838 #include"../base/MolDSException.h"
3939 #include"../base/Uncopyable.h"
40+#include"../base/Enums.h"
4041 #include"Lapack.h"
4142
4243 #ifdef __INTEL_COMPILER
@@ -116,7 +117,9 @@ molds_lapack_int Lapack::Dsyevd(double** matrix, double* eigenValues, molds_lapa
116117 if(size < 1 ){
117118 stringstream ss;
118119 ss << errorMessageDsyevdSize;
119- throw MolDSException(ss.str());
120+ MolDSException ex(ss.str());
121+ ex.SetKeyValue<int>(LapackInfo, info);
122+ throw ex;
120123 }
121124 else if(size == 1){
122125 lwork = 1;
@@ -192,7 +195,9 @@ molds_lapack_int Lapack::Dsyevd(double** matrix, double* eigenValues, molds_lapa
192195 stringstream ss;
193196 ss << errorMessageDsyevdInfo;
194197 ss << info << endl;
195- throw MolDSException(ss.str());
198+ MolDSException ex(ss.str());
199+ ex.SetKeyValue<int>(LapackInfo, info);
200+ throw ex;
196201 }
197202 return info;
198203 }
@@ -272,7 +277,9 @@ molds_lapack_int Lapack::Dsysv(double const* const* matrix, double* b, molds_lap
272277 stringstream ss;
273278 ss << errorMessageDsysvInfo;
274279 ss << info << endl;
275- throw MolDSException(ss.str());
280+ MolDSException ex(ss.str());
281+ ex.SetKeyValue<int>(LapackInfo, info);
282+ throw ex;
276283 }
277284 return info;
278285 }
@@ -392,7 +399,9 @@ molds_lapack_int Lapack::Dgetrf(double* matrix, molds_lapack_int* ipiv, molds_la
392399 stringstream ss;
393400 ss << errorMessageDgetrfInfo;
394401 ss << info << endl;
395- throw MolDSException(ss.str());
402+ MolDSException ex(ss.str());
403+ ex.SetKeyValue<int>(LapackInfo, info);
404+ throw ex;
396405 }
397406 return info;
398407 }