29 #include "Kernels/aclKernelConfiguration.h" 55 namespace elementOperators
66 Element
operator+(Element e1, Element e2);
71 Element
operator-(Element e1, Element e2);
76 Element
operator*(Element e1, Element e2);
81 Element
operator/(Element e1, Element e2);
86 Element
operator%(Element e1, Element e2);
125 Element
operator>(Element e1, Element e2);
130 Element
operator<(Element e1, Element e2);
145 Element
isEqual(Element e1, Element e2);
172 Element
sin(Element e);
177 Element
cos(Element e);
182 Element
sqrt(Element e);
187 Element
rsqrt(Element e);
192 Element
log(Element e);
197 Element
log10(Element e);
203 Element
powI(Element a,
unsigned int i);
209 Element
exp(Element a);
215 Element
fabs(Element a);
221 Element
abs(Element a);
227 Element
abs_diff(Element a,Element b);
233 Element
floor(Element a);
239 Element
isnan(Element a);
250 Element
copysign(Element a,Element b);
257 Element
sign(Element a);
263 Element
min(Element a,Element b);
269 Element
max(Element a,Element b);
286 Element
mad(Element e1, Element e2, Element e3);
308 Element
barrier(std::string flags =
"CLK_LOCAL_MEM_FENCE");
320 Element
excerpt(Element source, Element filter);
329 Element
parse(
const std::vector<std::pair<Element, std::string> > & elementNamePairs,
330 const std::string & statement);
336 Element
convert(
const TypeID tName, Element e1,
bool strong=
true);
350 Element
ifElse(Element condition,
351 const std::vector<Element> & thenBody,
352 const std::vector<Element> & elseBody);
357 Element
select(Element e1, Element e2, Element e3);
362 Element
forLoop(Element initialization,
365 const std::vector<Element> & body);
368 Element
any(Element e);
370 Element
all(Element e);
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);
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);
427 const std::vector<Element> & a);
434 std::vector<Element> & operator<<(std::vector<Element> & ec,
435 const std::vector<Element> & a);
457 Element initializationValue,
480 CommandQueue queue_);
Element abs_diff(Element a, Element b)
bool isConstant(Element e)
Advanced Computational Language.
Element barrier(std::string flags="CLK_LOCAL_MEM_FENCE")
The OpenCL C++ bindings are defined within this namespace.
Element any(Element e)
Corresponds to the openCL operation any.
Element operator+(Element e1, Element e2)
Element isNotEqual(Element e1, Element e2)
Element all(Element e)
Corresponds to the openCL operation all.
bool isMemBlock(Element e)
Element operator+=(Element e1, Element e2)
std::shared_ptr< cl::CommandQueue > CommandQueue
Element operator-(Element e1, Element e2)
Element operator>(Element e1, Element e2)
Element max(Element a, Element b)
Element generateElementLocalArray(TypeID typeID, unsigned int size)
Element min(Element a, Element b)
Element ifElse(Element condition, const std::vector< Element > &thenBody, const std::vector< Element > &elseBody)
Element operatorAssignmentSafe(Element e1, Element e2)
Element operator/(Element e1, Element e2)
Element operator!(Element e)
Element operator||(Element e1, Element e2)
ElementData generateElementArray(TypeID typeID, unsigned int size, CommandQueue queue_)
cl_int copy(IteratorType startIterator, IteratorType endIterator, cl::Buffer &buffer)
The class represents a matrix elements of Element.
std::ostream & operator<<(std::ostream &output, const std::vector< T > &vector)
Prints elements of the vector separated by space.
Element mad(Element e1, Element e2, Element e3)
std::shared_ptr< MemBlock > ElementData
Element copysign(Element a, Element b)
Element operatorAssignment(Element e1, Element e2)
Element select(Element e1, Element e2, Element e3)
Element operator>=(Element e1, Element e2)
const Block offset(const Block &bl, int a=1)
Element atomic_add(Element e1, Element e2)
Element parse(const std::vector< std::pair< Element, std::string > > &elementNamePairs, const std::string &statement)
The class represents several Element.
Element generateShiftedElement(Element, Element offset)
Element atomic_xchg(Element e1, Element e2)
void swapBuffers(std::shared_ptr< Array< T > >a, std::shared_ptr< Array< T > > b)
Element atomic_sub(Element e1, Element e2)
ACL Kernel configuration class.
bool isSingleValue(Element e)
The function returns true when the input is a single valued object e.g. aclConstatnt, aclVariable.
CommandQueue interface for cl_command_queue.
Element operator<(Element e1, Element e2)
Element operator&&(Element e1, Element e2)
Element powI(Element a, unsigned int i)
Element operator/=(Element e1, Element e2)
Element returnStatement()
std::shared_ptr< ElementBase > Element
Element forLoop(Element initialization, Element condition, Element increase, const std::vector< Element > &body)
Element printfFunction(std::string args)
Element excerpt(Element source, Element filter)
Element generateSubElement(Element, unsigned int size, Element offset)
Element operator*=(Element e1, Element e2)
Element convert(const TypeID tName, Element e1, bool strong=true)
Element operator-=(Element e1, Element e2)
Element isEqual(Element e1, Element e2)
void initData(Element a, Element initializationValue, const KernelConfiguration &kernelConfig=KERNEL_BASIC)
Element syncCopy(Element source, Element destination, Element srcOffset, Element dstOffset, Element length)
const KernelConfiguration KERNEL_BASIC
Element operator*(Element e1, Element e2)
Element operator%(Element e1, Element e2)
Element operator<=(Element e1, Element e2)