Initial commit

This commit is contained in:
Matthias
2017-04-11 15:49:55 +02:00
commit 3d8f381bae
106 changed files with 4407 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
auto myiter = WFR_SELF_GETITERATIONID();
std::cout << "AtomicActivity1 [" << myiter << "]:" << std::endl
<< "\tin1: " << sin->in1.getValue() << std::endl
<< "\tin2: " << sin->in2.getValue() << std::endl;
#include <sstream>
if (sin->in2.getValue() <= 0) {
std::stringstream ss;
ss << "Test Failure: in2 value [" << sin->in2.getValue() << "] is not greater than zero.";
throw wfr::exception::wfr_fatal_error(ss.str());
}
if (myiter+1 != sin->in1.getValue()) {
std::stringstream ss;
ss << "Test Failure: in1 value [" << sin->in1.getValue() << "] is not equal to iterationID+1 [" << myiter+1 << "].";
throw wfr::exception::wfr_fatal_error(ss.str());
}
if (sin->in1.getValue() > sin->in2.getValue()) {
std::stringstream ss;
ss << "Test Failure: in1 value [" << sin->in1.getValue() << "] is not less equal than in2 value [" << sin->in2.getValue() << "].";
throw wfr::exception::wfr_fatal_error(ss.str());
}
sout->out1.setValue(sin->in1.getValue());
+4
View File
@@ -0,0 +1,4 @@
name=AtomicActivity1
entries=1
entry.0=atomic1.code
+32
View File
@@ -0,0 +1,32 @@
std::cout << "AtomicActivity2:" << std::endl
<< "\tin1: " << sin->in1.getValue() << std::endl;
#include <sstream>
if (sin->in1.getValue() <= 0) {
std::stringstream ss;
ss << "Test Failure: in1 value [" << sin->in1.getValue() << "] is not greater than zero.";
throw wfr::exception::wfr_fatal_error(ss.str());
}
if (sin->in1.getValue() != sin->in2.getSize()) {
std::stringstream ss;
ss << "Test Failure: in2 collection size [" << sin->in2.getSize() << "] is not equal in1 [" << sin->in1.getValue() << "].";
throw wfr::exception::wfr_fatal_error(ss.str());
}
std::cout << "\tin2: [ ";
bool isFirst = true;
for (wfr_id_t t = 0; t < sin->in2.getSize(); t++) {
if (sin->in2.getEntryValue(t) != t+1) {
#include <sstream>
std::stringstream ss;
ss << "Test Failure: in2 collection value index [" << t << "] does not has correct value [" << sin->in2.getEntryValue(t)<< "].";
throw wfr::exception::wfr_fatal_error(ss.str());
}
if (isFirst) {
isFirst = false;
} else {
std::cout << ", ";
}
std::cout << sin->in2.getEntryValue(t);
}
std::cout << " ]" << std::endl;
sout->out1 = sin->in2;
sout->isOk.setValue(true);
+4
View File
@@ -0,0 +1,4 @@
name=AtomicActivity2
entries=1
entry.0=atomic2.code
+2
View File
@@ -0,0 +1,2 @@
wfInput.iterationCount.setValue(4);
+31
View File
@@ -0,0 +1,31 @@
std::cout << "wfOutput:" << std::endl
<< "\tglobalOut1: " << wfOutput.globalOut1.getValue() << std::endl;
if (!wfOutput.globalOut1.getValue()) {
std::stringstream ss;
ss << "Test Failure: globalOut1 [" << wfOutput.globalOut1.getValue() << "] is not true.";
throw wfr::exception::wfr_fatal_error(ss.str());
}
if (wfOutput.globalOut2.getSize() != wfInput.iterationCount.getValue()) {
#include <sstream>
std::stringstream ss;
ss << "Test Failure: globalOut2 collection size [" << wfOutput.globalOut2.getSize() << "] is not equal iterationCount [" << wfInput.iterationCount.getValue() << "].";
throw wfr::exception::wfr_fatal_error(ss.str());
}
std::cout << "\tglobalOut2: [ ";
bool isFirst = true;
for (wfr_id_t t = 0; t < wfOutput.globalOut2.getSize(); t++) {
if (wfOutput.globalOut2.getEntryValue(t) != t+1) {
#include <sstream>
std::stringstream ss;
ss << "Test Failure: globalOut2 collection value index [" << t << "] does not have correct value [" << wfOutput.globalOut2.getEntryValue(t)<< "].";
throw wfr::exception::wfr_fatal_error(ss.str());
}
if (isFirst) {
isFirst = false;
} else {
std::cout << ", ";
}
std::cout << wfOutput.globalOut2.getEntryValue(t);
}
std::cout << " ]" << std::endl;