#include "acl/acl.h"
#include "acl/aclGenerators.h"
#include "acl/aclMath/aclMatrixOfElements.h"
#include "acl/aclMath/aclVectorOfElements.h"
#include "acl/aclMath/aclVectorOfElements.h"
#include "math/aslMatrices.h"
#include "acl/Kernels/aclKernel.h"
#include "acl/DataTypes/aclArray.h"
{
cout << "Test of \"Matrix Operations\" function..." << flush;
{
}
vector<cl_float> output(10);
bool status(output[1] == 20.5);
return status;
}
{
cout << "Test of \"System Solve Cramer's rule\" function..." << flush;
{
}
vector<cl_float> output(10);
bool status(output[1] > 0.09 && output[1] < .1);
return status;
}
{
cout <<
"Test of \"System Solve congugate gradient method\" function..." <<
flush;
{
}
vector<cl_float> output(10);
bool status(output[1] > 0.09 && output[1] < .1);
return status;
}
{
bool allTestsPassed(true);
return allTestsPassed ? EXIT_SUCCESS : EXIT_FAILURE;
}
MatrixOfElements elementProduct(const VectorOfElements &a, const VectorOfElements &b)
element product of two vectors
The class represents several Element.
AMatr< T > makeAMatr(const AVec< T > &a)
generates a matrix with a row
vector< Element > gcSolveSystemCG(const MatrixOfElements &a, const VectorOfElements &b, const VectorOfElements &x)
generates code for solving the solution of a system of linear equations
vector< Element > gcSolveSystem(const MatrixOfElements &a, const VectorOfElements &b, const VectorOfElements &x)
generates code for solving the solution of a system of linear equations
void errorMessage(cl_int status, const char *errorMessage)
Prints errorMessage and exits depending on the status.
MatrixOfElements generateMEConstant(const asl::AMatr< T > &a)
Generates VectorOfElements correspondinng to a.
VectorOfElementsData generateVEData(unsigned int length, unsigned int nComponents, CommandQueue queue)
Generates VectorOfElements with nComponents Elements acl::Vector with size length.
VectorOfElements generateVEConstant(T a)
Generates VectorOfElements with 1 Element acl::Constant with value a.
definitions of mathematical operators and functions for class Element
Advanced Computational Language.
void copy(MemBlock &source, T *destination)
Advanced Simulation Library.
bool testMatrixOperations()