44 #include <initializer_list> 52 cout <<
"Test of If-Else..." <<
flush;
54 using namespace elementOperators;
59 vector<cl_float> input(11, 2);
60 vector<cl_float> output(11, 0);
61 vector<cl_float> expected({8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8});
83 bool status(output == expected);
92 cout <<
"Test of Parser..." <<
flush;
94 using namespace elementOperators;
99 vector<cl_float> input(11, 2);
100 vector<cl_float> output(11, 0);
101 vector<cl_float> expected({35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35});
105 string statement(
"a + c0 + c1 + vec");
121 bool status(output == expected);
129 cout <<
"Test of Atomic Sum..." <<
flush;
131 using namespace elementOperators;
134 vector<cl_int> input(11, 2);
135 vector<cl_int> output(11, 0);
136 vector<cl_int> expected({8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8});
148 bool status(output == expected);
156 bool allTestsPassed(
true);
162 return allTestsPassed ? EXIT_SUCCESS : EXIT_FAILURE;
If-Else conditional structure.
Advanced Computational Language.
void setStatement(string statement_)
void errorMessage(cl_int status, const char *errorMessage)
Prints errorMessage and exits depending on the status.
void addBodyExpressionElse(Element expression_)
void addExpression(Element expression_)
Element operatorAssignment(Element e1, Element e2)
Element atomic_add(Element e1, Element e2)
void addBodyExpressionIf(Element expression_)
ACL Kernel configuration class.
std::shared_ptr< ElementBase > Element
const acl::KernelConfiguration & kConf(acl::KERNEL_BASIC)
void addElementNamePair(Element element, string name)
Element isEqual(Element e1, Element e2)
void copy(MemBlock &source, T *destination)
const KernelConfiguration KERNEL_BASIC
std::vector< std::string > extensions