#include <math.h>
#include <initializer_list>
{
cout <<
"Test of If-Else..." <<
flush;
using namespace elementOperators;
vector<cl_float> input(11, 2);
vector<cl_float> output(11, 0);
vector<cl_float> expected({8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8});
bool status(output == expected);
return status;
}
{
cout <<
"Test of Parser..." <<
flush;
using namespace elementOperators;
vector<cl_float> input(11, 2);
vector<cl_float> output(11, 0);
vector<cl_float> expected({35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35});
string statement("a + c0 + c1 + vec");
parser->addElementNamePair(a, "a");
parser->addElementNamePair(c0, "c0");
parser->addElementNamePair(c1, "c1");
parser->addElementNamePair(vec, "vec");
parser->setStatement(statement);
bool status(output == expected);
return status;
}
{
cout <<
"Test of Atomic Sum..." <<
flush;
using namespace elementOperators;
vector<cl_int> input(11, 2);
vector<cl_int> output(11, 0);
vector<cl_int> expected({8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8});
bool status(output == expected);
return status;
}
{
bool allTestsPassed(true);
return allTestsPassed ? EXIT_SUCCESS : EXIT_FAILURE;
}
void copy(const ComplexNumOfElements &source, ComplexNumOfElements &destination)
function copies the ComplexNumOfElements class.
If-Else conditional structure.
void addExpression(Element expression_)
ACL Kernel configuration class.
std::vector< std::string > extensions
Element operatorAssignment(Element e1, Element e2)
Element atomic_add(Element e1, Element e2)
Element isEqual(Element e1, Element e2)
void errorMessage(cl_int status, const char *errorMessage)
Prints errorMessage and exits depending on the status.
const KernelConfiguration KERNEL_BASIC
Advanced Computational Language.
std::shared_ptr< ElementBase > Element
const acl::KernelConfiguration & kConf(acl::KERNEL_BASIC)