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;