ASL
0.1.7
Advanced Simulation Library
|
Go to the documentation of this file.
29 #include "Kernels/aclKernelConfiguration.h"
42 class ExpressionContainer;
43 class VectorOfElements;
44 class MatrixOfElements;
47 template <
class T>
class Array;
49 typedef std::shared_ptr<ElementBase>
Element;
55 namespace elementOperators
329 Element parse(
const std::vector<std::pair<Element, std::string> > & elementNamePairs,
330 const std::string & statement);
351 const std::vector<Element> & thenBody,
352 const std::vector<Element> & elseBody);
365 const std::vector<Element> & body);
387 template <
typename T>
void copy(MemBlock &source, T* destination);
391 template <
typename T>
void copy(T* source, MemBlock &destination);
395 template <
typename T>
void copy(MemBlock &source, std::vector<T> &destination);
399 template <
typename T>
void copy(std::vector<T> &source, MemBlock &destination);
403 template <
typename T>
void copy(MemBlock &source, MemBlock &destination);
407 template <
typename T>
void copy(
Element source, std::vector<T> &destination);
411 template <
typename T>
void copy(std::vector<T> &source,
Element destination);
415 template <
typename T>
void copy(
Element source, T* destination);
419 template <
typename T>
void copy(T* source,
Element destination);
426 ExpressionContainer &
operator<<(ExpressionContainer & ec,
427 const std::vector<Element> & a);
434 std::vector<Element> &
operator<<(std::vector<Element> & ec,
435 const std::vector<Element> & a);
443 ExpressionContainer &
operator<<(ExpressionContainer & ec,
444 const MatrixOfElements & a);
451 ExpressionContainer &
operator<<(ExpressionContainer & ec,
452 const ExpressionContainer & a);
458 const KernelConfiguration & kernelConfig =
KERNEL_BASIC);
472 template <
typename T>
void swapBuffers(std::shared_ptr<Array<T> >a,
473 std::shared_ptr<Array<T> > b);
Element barrier(std::string flags="CLK_LOCAL_MEM_FENCE")
Element powI(Element a, unsigned int i)
bool isMemBlock(Element e)
ElementData generateElementArray(TypeID typeID, unsigned int size)
bool isConstant(Element e)
Element isNotEqual(Element e1, Element e2)
Element ifElse(Element condition, const std::vector< Element > &thenBody, const std::vector< Element > &elseBody)
Element atomic_xchg(Element e1, Element e2)
Element mad(Element e1, Element e2, Element e3)
Element generateElementLocalArray(TypeID typeID, unsigned int size)
Element all(Element e)
Corresponds to the openCL operation all.
Element operator*(Element e1, Element e2)
Element operatorAssignmentSafe(Element e1, Element e2)
Element operator+(Element e1, Element e2)
Element min(Element a, Element b)
Element operator>(Element e1, Element e2)
Element atomic_add(Element e1, Element e2)
Element operator!(Element e)
Element abs_diff(Element a, Element b)
Element select(Element e1, Element e2, Element e3)
std::shared_ptr< cl::CommandQueue > CommandQueue
std::ostream & operator<<(std::ostream &output, const std::vector< T > &vector)
Prints elements of the vector separated by space.
Element operator>=(Element e1, Element e2)
Element copysign(Element a, Element b)
Element operator/=(Element e1, Element e2)
Element operator||(Element e1, Element e2)
std::shared_ptr< MemBlock > ElementData
const Block offset(const Block &bl, int a=1)
bool isSingleValue(Element e)
The function returns true when the input is a single valued object e.g. aclConstatnt,...
Element atomic_sub(Element e1, Element e2)
The OpenCL C++ bindings are defined within this namespace.
Element operator<=(Element e1, Element e2)
Element operatorAssignment(Element e1, Element e2)
Element operator*=(Element e1, Element e2)
Element max(Element a, Element b)
Element returnStatement()
void swapBuffers(std::shared_ptr< Array< T > >a, std::shared_ptr< Array< T > > b)
Element forLoop(Element initialization, Element condition, Element increase, const std::vector< Element > &body)
Element operator&&(Element e1, Element e2)
Element parse(const std::vector< std::pair< Element, std::string > > &elementNamePairs, const std::string &statement)
Element operator-(Element e)
Element operator/(Element e1, Element e2)
std::shared_ptr< ElementBase > Element
Element operator<(Element e1, Element e2)
Element printfFunction(std::string args)
Element generateShiftedElement(Element, int offset)
Element convert(const TypeID tName, Element e1, bool strong=true)
Element generateSubElement(Element, unsigned int size, int offset)
function creates subElement with given length and offset; offset is constant
void copy(MemBlock &source, T *destination)
Element operator%(Element e1, Element e2)
Element isEqual(Element e1, Element e2)
void initData(Element a, Element initializationValue, const KernelConfiguration &kernelConfig=KERNEL_BASIC)
Element excerpt(Element source, Element filter)
Element operator+=(Element e1, Element e2)
Element any(Element e)
Corresponds to the openCL operation any.
const KernelConfiguration KERNEL_BASIC
Advanced Computational Language.
Element operator-=(Element e1, Element e2)
Element syncCopy(Element source, Element destination, Element srcOffset, Element dstOffset, Element length)