Initial commit
This commit is contained in:
Executable
+17
@@ -0,0 +1,17 @@
|
||||
|
||||
name=AtomicActivity1
|
||||
entries=4
|
||||
entry.0=atomic1a.code
|
||||
entryname.0=atomic1a
|
||||
entrytype.0=pthreads
|
||||
entrymetadata.0={{\"key1\", \"value1\"}, {\"key2\", \"value2\"}}
|
||||
entry.1=atomic1b.code
|
||||
entryname.1=atomic1b
|
||||
entrytype.1=openCL
|
||||
entry.2=atomic1b.code
|
||||
entryname.2=atomic1c
|
||||
entrytype.2=cuda
|
||||
entry.3=atomic1sim.code
|
||||
entryname.3=atomic1sim
|
||||
entrytype.3=pthreads
|
||||
entrymetadata.3={{\"sim-mode\", \"1\"}}
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
auto myiter = WFR_SELF_GETITERATIONID();
|
||||
std::cout << "AtomicActivity1 [" << myiter << "]:" << std::endl
|
||||
<< "\titerCount: " << sin->iterCount.getValue() << std::endl
|
||||
<< "\ttaskIn1: " << sin->taskIn1.getValue() << std::endl
|
||||
<< "\tloopPortIn1: " << sin->loopPortIn1.getValue() << std::endl;
|
||||
#include <sstream>
|
||||
if (myiter+1 != sin->taskIn1.getValue()) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: IterationID+1 [" << myiter+1 << "] does not match taskIn1 [" << sin->taskIn1.getValue()<< "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (myiter == 0 && sin->iterCount.getValue() != sin->loopPortIn1.getValue()) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: LoopPortIn1 [" << sin->loopPortIn1.getValue() << "] does not match iterCount [" << sin->iterCount.getValue()<< "] in 1st iteration.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (myiter > 0 && sin->loopPortIn1.getValue() != myiter) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: LoopPortIn1 [" << sin->loopPortIn1.getValue() << "] does not match iterationID- [" << myiter << "] in subsequent iterations.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
sout->taskOut1.setValue(sin->taskIn1.getValue());
|
||||
sout->isOK.setValue(true);
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
auto myiter = WFR_SELF_GETITERATIONID();
|
||||
std::cout << "AtomicActivity1 [" << myiter << "]:" << std::endl
|
||||
<< "\titerCount: " << sin->iterCount.getValue() << std::endl
|
||||
<< "\ttaskIn1: " << sin->taskIn1.getValue() << std::endl
|
||||
<< "\tloopPortIn1: " << sin->loopPortIn1.getValue() << std::endl;
|
||||
#include <sstream>
|
||||
if (myiter+1 != sin->taskIn1.getValue()) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: IterationID+1 [" << myiter+1 << "] does not match taskIn1 [" << sin->taskIn1.getValue()<< "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (myiter == 0 && sin->iterCount.getValue() != sin->loopPortIn1.getValue()) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: LoopPortIn1 [" << sin->loopPortIn1.getValue() << "] does not match iterCount [" << sin->iterCount.getValue()<< "] in 1st iteration.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (myiter > 0 && sin->loopPortIn1.getValue() != myiter) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: LoopPortIn1 [" << sin->loopPortIn1.getValue() << "] does not match iterationID- [" << myiter << "] in subsequent iterations.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
sout->taskOut1.setValue(sin->taskIn1.getValue());
|
||||
sout->isOK.setValue(true);
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
auto myiter = WFR_SELF_GETITERATIONID();
|
||||
std::cout << "AtomicActivity1 [" << myiter << "]:" << std::endl
|
||||
<< "\titerCount: " << sin->iterCount.getValue() << std::endl
|
||||
<< "\ttaskIn1: " << sin->taskIn1.getValue() << std::endl
|
||||
<< "\tloopPortIn1: " << sin->loopPortIn1.getValue() << std::endl;
|
||||
#include <sstream>
|
||||
if (myiter+1 != sin->taskIn1.getValue()) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: IterationID+1 [" << myiter+1 << "] does not match taskIn1 [" << sin->taskIn1.getValue()<< "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (myiter == 0 && sin->iterCount.getValue() != sin->loopPortIn1.getValue()) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: LoopPortIn1 [" << sin->loopPortIn1.getValue() << "] does not match iterCount [" << sin->iterCount.getValue()<< "] in 1st iteration.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (myiter > 0 && sin->loopPortIn1.getValue() != myiter) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: LoopPortIn1 [" << sin->loopPortIn1.getValue() << "] does not match iterationID- [" << myiter << "] in subsequent iterations.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
sout->taskOut1.setValue(sin->taskIn1.getValue());
|
||||
sout->isOK.setValue(true);
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
auto myiter = WFR_SELF_GETITERATIONID();
|
||||
std::cout << "AtomicActivity1 [" << myiter << "]:" << std::endl
|
||||
<< "\titerCount: " << sin->iterCount.getValue() << std::endl
|
||||
<< "\ttaskIn1: " << sin->taskIn1.getValue() << std::endl
|
||||
<< "\tloopPortIn1: " << sin->loopPortIn1.getValue() << std::endl;
|
||||
#include <sstream>
|
||||
if (myiter+1 != sin->taskIn1.getValue()) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: IterationID+1 [" << myiter+1 << "] does not match taskIn1 [" << sin->taskIn1.getValue()<< "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (myiter == 0 && sin->iterCount.getValue() != sin->loopPortIn1.getValue()) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: LoopPortIn1 [" << sin->loopPortIn1.getValue() << "] does not match iterCount [" << sin->iterCount.getValue()<< "] in 1st iteration.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (myiter > 0 && sin->loopPortIn1.getValue() != myiter) {
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: LoopPortIn1 [" << sin->loopPortIn1.getValue() << "] does not match iterationID- [" << myiter << "] in subsequent iterations.";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
|
||||
EXECUTE_SIMULATION_MODE
|
||||
|
||||
sout->taskOut1.setValue(sin->taskIn1.getValue());
|
||||
sout->isOK.setValue(true);
|
||||
Executable
+79
@@ -0,0 +1,79 @@
|
||||
std::cout << "AtomicActivity2:" << std::endl
|
||||
<< "\titerCount: " << sin->iterCount.getValue() << std::endl
|
||||
<< "\toutPortIn1: " << sin->outPortIn1.getValue() << std::endl
|
||||
<< "\toutPortIn2: " << sin->outPortIn2.getValue() << std::endl
|
||||
<< "\tloopPortIn1: " << sin->loopPortIn1.getValue() << std::endl;
|
||||
if (sin->iterCount.getValue() <= 0) {
|
||||
#include <sstream>
|
||||
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->outPortIn1.getValue()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: outPortIn1 [" << sin->outPortIn1.getValue() << "] is not equal iterCount [" << (sin->iterCount.getValue()) << "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (sin->iterCount.getValue() != sin->outPortIn2.getValue()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: outPortIn2 [" << sin->outPortIn2.getValue() << "] is not equal iterCount [" << (sin->iterCount.getValue()) << "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (sin->iterCount.getValue() != sin->loopPortIn1.getValue()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: loopPortIn1 [" << sin->loopPortIn1.getValue() << "] is not equal iterCount [" << (sin->iterCount.getValue()) << "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (sin->unionPortIn1.getSize() != sin->iterCount.getValue()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: unionPortIn1 collection size [" << sin->unionPortIn1.getSize() << "] is not equal iterCount [" << sin->iterCount.getValue() << "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
std::cout << "\tunionPortIn1: [ ";
|
||||
bool isFirst = true;
|
||||
for (wfr_id_t t = 0; t < sin->unionPortIn1.getSize(); t++) {
|
||||
if (sin->unionPortIn1.getEntryValue(t) != t+1) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: unionPortIn1 collection value index [" << t << "] does not have value [" << sin->unionPortIn1.getEntryValue(t)<< "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
} else {
|
||||
std::cout << ", ";
|
||||
}
|
||||
std::cout << sin->unionPortIn1.getEntryValue(t);
|
||||
}
|
||||
std::cout << " ]" << std::endl;
|
||||
if (sin->isOkUnion1.getSize() != sin->iterCount.getValue()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: isOkUnion1 collection size [" << sin->isOkUnion1.getSize() << "] is not equal iterCount [" << sin->iterCount.getValue() << "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
std::cout << "\tisOkUnion1: [ ";
|
||||
isFirst = true;
|
||||
for (wfr_id_t t = 0; t < sin->isOkUnion1.getSize(); t++) {
|
||||
if (!sin->isOkUnion1.getEntryValue(t)) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: isOkUnion1 collection value at index [" << t << "] is not true].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
} else {
|
||||
std::cout << ", ";
|
||||
}
|
||||
std::cout << sin->isOkUnion1.getEntryValue(t);
|
||||
}
|
||||
std::cout << " ]" << std::endl;
|
||||
sout->outPortOut1.setValue(sin->outPortIn1.getValue());
|
||||
sout->loopPortOut1.setValue(sin->loopPortIn1.getValue());
|
||||
sout->unionPortOut1 = sin->unionPortIn1;
|
||||
sout->isOK.setValue(true);
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
|
||||
name=AtomicActivity2
|
||||
entries=2
|
||||
entry.0=atomic2.code
|
||||
entry.1=atomic2sim.code
|
||||
entryname.1=atomic2sim
|
||||
entrytype.1=pthreads
|
||||
entrymetadata.1={{\"sim-mode\", \"1\"}}
|
||||
Executable
+82
@@ -0,0 +1,82 @@
|
||||
std::cout << "AtomicActivity2:" << std::endl
|
||||
<< "\titerCount: " << sin->iterCount.getValue() << std::endl
|
||||
<< "\toutPortIn1: " << sin->outPortIn1.getValue() << std::endl
|
||||
<< "\toutPortIn2: " << sin->outPortIn2.getValue() << std::endl
|
||||
<< "\tloopPortIn1: " << sin->loopPortIn1.getValue() << std::endl;
|
||||
if (sin->iterCount.getValue() <= 0) {
|
||||
#include <sstream>
|
||||
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->outPortIn1.getValue()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: outPortIn1 [" << sin->outPortIn1.getValue() << "] is not equal iterCount [" << (sin->iterCount.getValue()) << "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (sin->iterCount.getValue() != sin->outPortIn2.getValue()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: outPortIn2 [" << sin->outPortIn2.getValue() << "] is not equal iterCount [" << (sin->iterCount.getValue()) << "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (sin->iterCount.getValue() != sin->loopPortIn1.getValue()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: loopPortIn1 [" << sin->loopPortIn1.getValue() << "] is not equal iterCount [" << (sin->iterCount.getValue()) << "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (sin->unionPortIn1.getSize() != sin->iterCount.getValue()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: unionPortIn1 collection size [" << sin->unionPortIn1.getSize() << "] is not equal iterCount [" << sin->iterCount.getValue() << "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
std::cout << "\tunionPortIn1: [ ";
|
||||
bool isFirst = true;
|
||||
for (wfr_id_t t = 0; t < sin->unionPortIn1.getSize(); t++) {
|
||||
if (sin->unionPortIn1.getEntryValue(t) != t+1) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: unionPortIn1 collection value index [" << t << "] does not have value [" << sin->unionPortIn1.getEntryValue(t)<< "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
} else {
|
||||
std::cout << ", ";
|
||||
}
|
||||
std::cout << sin->unionPortIn1.getEntryValue(t);
|
||||
}
|
||||
std::cout << " ]" << std::endl;
|
||||
if (sin->isOkUnion1.getSize() != sin->iterCount.getValue()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: isOkUnion1 collection size [" << sin->isOkUnion1.getSize() << "] is not equal iterCount [" << sin->iterCount.getValue() << "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
std::cout << "\tisOkUnion1: [ ";
|
||||
isFirst = true;
|
||||
for (wfr_id_t t = 0; t < sin->isOkUnion1.getSize(); t++) {
|
||||
if (!sin->isOkUnion1.getEntryValue(t)) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: isOkUnion1 collection value at index [" << t << "] is not true].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
} else {
|
||||
std::cout << ", ";
|
||||
}
|
||||
std::cout << sin->isOkUnion1.getEntryValue(t);
|
||||
}
|
||||
std::cout << " ]" << std::endl;
|
||||
|
||||
EXECUTE_SIMULATION_MODE
|
||||
|
||||
sout->outPortOut1.setValue(sin->outPortIn1.getValue());
|
||||
sout->loopPortOut1.setValue(sin->loopPortIn1.getValue());
|
||||
sout->unionPortOut1 = sin->unionPortIn1;
|
||||
sout->isOK.setValue(true);
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
wfInput.iterationCount.setValue(2);
|
||||
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
/*if (wfOutput.unionPortOut1.getSize() != wfInput.iterationCount.getValue()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: unionPortOut1 collection size [" << wfOutput.unionPortOut1.getSize() << "] is not equal iterCount [" << wfInput.iterationCount.getValue() << "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (wfOutput.outPortOut1.getValue() != wfInput.iterationCount.getValue()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: outPortOut1 value [" << wfOutput.outPortOut1.getValue() << "] is not equal iterCount [" << wfInput.iterationCount.getValue() << "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (wfOutput.loopPortOut1.getValue() != wfInput.iterationCount.getValue()) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: loopPortOut1 value [" << wfOutput.loopPortOut1.getValue() << "] is not equal iterCount [" << wfInput.iterationCount.getValue() << "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}*/
|
||||
std::cout << "wfOutput:" << std::endl
|
||||
<< "\toutPortOut1: " << wfOutput.outPortOut1.getValue() << std::endl
|
||||
<< "\tloopPortOut1: " << wfOutput.loopPortOut1.getValue() << std::endl
|
||||
<< "\tisOK: " << wfOutput.isOK.getValue() << std::endl;
|
||||
std::cout << "\tunionPortOut1: [ ";
|
||||
bool isFirst = true;
|
||||
for (wfr_id_t t = 0; t < wfOutput.unionPortOut1.getSize(); t++) {
|
||||
if (wfOutput.unionPortOut1.getEntryValue(t) != t+1) {
|
||||
#include <sstream>
|
||||
std::stringstream ss;
|
||||
ss << "Test Failure: unionPortOut1 collection value index [" << t << "] does not have correct value [" << wfOutput.unionPortOut1.getEntryValue(t)<< "].";
|
||||
throw wfr::exception::wfr_fatal_error(ss.str());
|
||||
}
|
||||
if (isFirst) {
|
||||
isFirst = false;
|
||||
} else {
|
||||
std::cout << ", ";
|
||||
}
|
||||
std::cout << wfOutput.unionPortOut1.getEntryValue(t);
|
||||
}
|
||||
std::cout << " ]" << std::endl;
|
||||
Reference in New Issue
Block a user