1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-10 14:10:46 +01:00

Removed some assertions in Test_simd and removed exit() in Reduce

This commit is contained in:
nmeyer-ur 2020-05-11 22:43:00 +02:00
parent 05edf803bd
commit b7c76ede29
2 changed files with 44 additions and 34 deletions

View File

@ -691,7 +691,7 @@ struct Reduce{
//General form must generate error if compiled //General form must generate error if compiled
inline Out_type operator()(In_type in){ inline Out_type operator()(In_type in){
printf("Error, using wrong Reduce function\n"); printf("Error, using wrong Reduce function\n");
exit(1); //exit(1);
return 0; return 0;
} }
}; };

View File

@ -172,8 +172,10 @@ void Tester(const functor &func)
} }
if ( ok==0 ) { if ( ok==0 ) {
std::cout<<GridLogMessage << " OK!" <<std::endl; std::cout<<GridLogMessage << " OK!" <<std::endl;
} else {
std::cout<<GridLogMessage << " wrong!" <<std::endl;
} }
assert(ok==0); //assert(ok==0);
} }
template<class functor> template<class functor>
@ -229,8 +231,10 @@ void IntTester(const functor &func)
} }
if ( ok==0 ) { if ( ok==0 ) {
std::cout<<GridLogMessage << " OK!" <<std::endl; std::cout<<GridLogMessage << " OK!" <<std::endl;
} else {
std::cout<<GridLogMessage << " wrong!" <<std::endl;
} }
assert(ok==0); //assert(ok==0);
} }
@ -278,8 +282,10 @@ void ReductionTester(const functor &func)
} }
if ( ok==0 ) { if ( ok==0 ) {
std::cout<<GridLogMessage << " OK!" <<std::endl; std::cout<<GridLogMessage << " OK!" <<std::endl;
} else {
std::cout<<GridLogMessage << " wrong!" <<std::endl;
} }
assert(ok==0); //assert(ok==0);
} }
@ -323,8 +329,10 @@ void IntReductionTester(const functor &func)
} }
if ( ok==0 ) { if ( ok==0 ) {
std::cout<<GridLogMessage << " OK!" <<std::endl; std::cout<<GridLogMessage << " OK!" <<std::endl;
} else {
std::cout<<GridLogMessage << " wrong!" <<std::endl;
} }
assert(ok==0); //assert(ok==0);
} }
@ -445,8 +453,10 @@ void PermTester(const functor &func)
} }
if ( ok==0 ) { if ( ok==0 ) {
std::cout<<GridLogMessage << " OK!" <<std::endl; std::cout<<GridLogMessage << " OK!" <<std::endl;
} else {
std::cout<<GridLogMessage << " wrong!" <<std::endl;
} }
assert(ok==0); //assert(ok==0);
} }