Initial commit
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
auto myiter = WFR_SELF_GETITERATIONID();
|
||||
std::cout << "AtomicActivity1 [" << myiter << "]:" << std::endl
|
||||
<< "\titerCount: " << sin->iterCount.getValue() << std::endl
|
||||
<< "\tloopPortIn1: " << sin->loopPortIn1.getValue() << std::endl;
|
||||
#include <sstream>
|
||||
if (myiter != sin->loopPortIn1.getValue()) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: IterationID [" << myiter << "] does not match loopPortIn1 [" << sin->loopPortIn1.getValue()<< "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (sin->iterCount.getValue() <= 0) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: iterCount [" << sin->iterCount.getValue() << "] is not greater than zero.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (sin->iterCount.getValue() < sin->loopPortIn1.getValue()) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: loopPortIn1 [" << sin->loopPortIn1.getValue() << "] is greater than iterCount [" << sin->iterCount.getValue() << "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
sout->taskOut1.setValue(sin->loopPortIn1.getValue()+1);
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
|
||||
name=AtomicActivity1
|
||||
entries=1
|
||||
entry.0=atomic1.code
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
std::cout << "AtomicActivity2:" << std::endl
|
||||
<< "\titerCount: " << sin->iterCount.getValue() << std::endl
|
||||
<< "\tin1: " << sin->in1.getValue() << std::endl
|
||||
<< "\tin3: " << sin->in3.getValue() << std::endl
|
||||
<< "\tin4: " << sin->in4.getValue() << std::endl;
|
||||
if (sin->iterCount.getValue() <= 0) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: iterCount [" << sin->iterCount.getValue() << "] is not greater than zero.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (sin->iterCount.getValue()+1 != sin->in1.getValue()) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: in1 [" << sin->in1.getValue() << "] is not equal iterCount+1.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (sin->iterCount.getValue()+1 != sin->in3.getValue()) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: in3 [" << sin->in3.getValue() << "] is not equal iterCount+1.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (sin->iterCount.getValue()+1 != sin->in4.getValue()) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: in4 [" << sin->in4.getValue() << "] is not equal iterCount+1.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
sout->out1.setValue(sin->in1.getValue());
|
||||
sout->out2 = sin->in2;
|
||||
sout->isOK.setValue(true);
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
|
||||
name=AtomicActivity2
|
||||
entries=1
|
||||
entry.0=atomic2.code
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
wfInput.iterationStart.setValue(0);
|
||||
wfInput.iterationCount.setValue(4);
|
||||
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
std::cout << "wfOutput:" << std::endl
|
||||
<< "\tglobalOut1: " << wfOutput.globalOut1.getValue() << std::endl
|
||||
<< "\tisOK: " << wfOutput.isOK.getValue() << std::endl;
|
||||
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;
|
||||
if (wfOutput.globalOut2.getSize() != wfInput.iterationCount.getValue()+1) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: globalOut2 size [" << wfOutput.globalOut2.getSize() << "] is not equal iterationCount+1 [" << wfInput.iterationCount.getValue()+1 << "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
Reference in New Issue
Block a user