Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion include/El/blas_like/level1/Fill.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ template<typename T>
void Fill( DistSparseMatrix<T>& A, T alpha )
{
EL_DEBUG_CSE
const Int m = A.Height();
const Int n = A.Width();
Zero( A );
if( alpha != T(0) )
Expand Down
2 changes: 0 additions & 2 deletions include/El/blas_like/level1/Scale.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ void Scale( S alphaS, Matrix<Real>& AReal, Matrix<Real>& AImag )
{
EL_DEBUG_CSE
typedef Complex<Real> C;
const Int m = AReal.Height();
const Int n = AReal.Width();
const C alpha = C(alphaS);
if( alpha != C(1) )
{
Expand Down
1 change: 1 addition & 0 deletions include/El/core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <exception>
#include <fstream>
#include <functional>
#include <iostream>
Expand Down
20 changes: 10 additions & 10 deletions include/El/core/Proxy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class MatrixWriteProxy

~MatrixWriteProxy()
{
if( !uncaught_exception() )
if( !has_uncaught_exception() )
Copy( *prox_, orig_ );
delete prox_;
}
Expand Down Expand Up @@ -116,7 +116,7 @@ class MatrixReadWriteProxy

~MatrixReadWriteProxy()
{
if( !uncaught_exception() )
if( !has_uncaught_exception() )
Copy( *prox_, orig_ );
delete prox_;
}
Expand Down Expand Up @@ -506,7 +506,7 @@ class DistMatrixWriteProxy<S,T,U,V,ELEMENT,void>

~DistMatrixWriteProxy()
{
if( !uncaught_exception() )
if( !has_uncaught_exception() )
Copy( *prox_, orig_ );
delete prox_;
}
Expand Down Expand Up @@ -568,7 +568,7 @@ class DistMatrixWriteProxy<T,T,U,V,ELEMENT,void>
{
if( madeCopy_ )
{
if( !uncaught_exception() )
if( !has_uncaught_exception() )
Copy( *prox_, orig_ );
delete prox_;
}
Expand Down Expand Up @@ -606,7 +606,7 @@ class DistMatrixWriteProxy<S,T,U,V,BLOCK,void>

~DistMatrixWriteProxy()
{
if( !uncaught_exception() )
if( !has_uncaught_exception() )
Copy( *prox_, orig_ );
delete prox_;
}
Expand Down Expand Up @@ -676,7 +676,7 @@ class DistMatrixWriteProxy<T,T,U,V,BLOCK,void>
{
if( madeCopy_ )
{
if( !uncaught_exception() )
if( !has_uncaught_exception() )
Copy( *prox_, orig_ );
delete prox_;
}
Expand Down Expand Up @@ -718,7 +718,7 @@ class DistMatrixReadWriteProxy<S,T,U,V,ELEMENT,void>

~DistMatrixReadWriteProxy()
{
if( !uncaught_exception() )
if( !has_uncaught_exception() )
Copy( *prox_, orig_ );
delete prox_;
}
Expand Down Expand Up @@ -780,7 +780,7 @@ class DistMatrixReadWriteProxy<T,T,U,V,ELEMENT,void>
{
if( madeCopy_ )
{
if( !uncaught_exception() )
if( !has_uncaught_exception() )
Copy( *prox_, orig_ );
delete prox_;
}
Expand Down Expand Up @@ -818,7 +818,7 @@ class DistMatrixReadWriteProxy<S,T,U,V,BLOCK,void>

~DistMatrixReadWriteProxy()
{
if( !uncaught_exception() )
if( !has_uncaught_exception() )
Copy( *prox_, orig_ );
delete prox_;
}
Expand Down Expand Up @@ -888,7 +888,7 @@ class DistMatrixReadWriteProxy<T,T,U,V,BLOCK,void>
{
if( madeCopy_ )
{
if( !uncaught_exception() )
if( !has_uncaught_exception() )
Copy( *prox_, orig_ );
delete prox_;
}
Expand Down
13 changes: 10 additions & 3 deletions include/El/core/environment/decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ using std::ostream;
using std::ostringstream;

using std::exception;
using std::uncaught_exception;
inline bool has_uncaught_exception() EL_NO_EXCEPT
{
#ifdef __cpp_lib_uncaught_exceptions
return std::uncaught_exceptions() > 0;
#else
return std::uncaught_exception();
#endif
}

void PrintVersion( ostream& os=cout );
void PrintConfig( ostream& os=cout );
Expand Down Expand Up @@ -251,12 +258,12 @@ EL_DEBUG_ONLY(
public:
CallStackEntry( string s )
{
if( !uncaught_exception() )
if( !has_uncaught_exception() )
PushCallStack(s);
}
~CallStackEntry()
{
if( !uncaught_exception() )
if( !has_uncaught_exception() )
PopCallStack();
}
};
Expand Down
Loading