24 #ifndef ACLVECTORELEMENTSOPERATIONS_H 25 #define ACLVECTORELEMENTSOPERATIONS_H 34 class KernelConfiguration;
37 typedef std::shared_ptr<ElementBase>
Element;
40 class VectorOfElements;
47 VectorOfElementsData
clone(VectorOfElementsData a);
51 VectorOfElementsData
clone(VectorOfElementsData a,
unsigned int n);
57 VectorOfElements initializationValue,
58 const KernelConfiguration & kernelConfig);
63 VectorOfElements initializationValue);
70 void copy(
const vector<Element> & source,
71 VectorOfElements & destination);
77 void copy(
const vector<ElementData> & source,
78 VectorOfElements & destination);
85 void copy(
const vector<Element> & source,
86 VectorOfElements & destination,
unsigned int start,
unsigned int end);
93 void copy(
const VectorOfElementsData & source,
94 VectorOfElementsData & destination);
99 VectorOfElements subVE(
const VectorOfElements & source,
105 VectorOfElements subVE(
const VectorOfElements & source,
110 VectorOfElements subVE(
const VectorOfElements & source,
111 const vector<unsigned int> & iList);
115 VectorOfElementsData subVE(
const VectorOfElementsData & source,
124 const VectorOfElementsData & b);
133 VectorOfElements assignmentSafe(
const VectorOfElements & a,
134 const VectorOfElements & b);
139 VectorOfElements
operator-(
const VectorOfElements & a);
145 VectorOfElements
operator+=(
const VectorOfElements & a,
146 const VectorOfElements & b);
151 VectorOfElements
operator-=(
const VectorOfElements & a,
152 const VectorOfElements & b);
158 VectorOfElements
operator*=(
const VectorOfElements & a,
159 const VectorOfElements & b);
165 VectorOfElements
operator/=(
const VectorOfElements & a,
166 const VectorOfElements & b);
171 VectorOfElements
operator+(
const VectorOfElements & a,
172 const VectorOfElements & b);
177 VectorOfElements
operator-(
const VectorOfElements & a,
178 const VectorOfElements & b);
185 VectorOfElements
operator*(
const VectorOfElements & a,
186 const VectorOfElements & b);
191 VectorOfElements
operator/(
const VectorOfElements & a,
192 const VectorOfElements & b);
196 VectorOfElements
operator%(
const VectorOfElements & a,
197 const VectorOfElements & b);
202 VectorOfElements
operator==(
const VectorOfElements & a,
203 const VectorOfElements & b);
208 VectorOfElements
operator!=(
const VectorOfElements & a,
209 const VectorOfElements & b);
214 VectorOfElements
operator>(
const VectorOfElements & a,
const VectorOfElements & b);
219 VectorOfElements
operator<(
const VectorOfElements & a,
220 const VectorOfElements & b);
224 VectorOfElements
operator<=(
const VectorOfElements & a,
225 const VectorOfElements & b);
229 VectorOfElements
operator>=(
const VectorOfElements & a,
230 const VectorOfElements & b);
234 VectorOfElements
operator&&(
const VectorOfElements & a,
235 const VectorOfElements & b);
239 VectorOfElements
operator||(
const VectorOfElements & a,
240 const VectorOfElements & b);
244 VectorOfElements
operator!(
const VectorOfElements & a);
250 VectorOfElements
crossProduct(
const VectorOfElements & a,
251 const VectorOfElements & b);
257 inline VectorOfElements
l2(
const VectorOfElements & a);
264 const VectorOfElements & b);
274 const VectorOfElements & b);
278 VectorOfElements
min(
const VectorOfElements & a,
279 const VectorOfElements & b);
283 VectorOfElements
min(
const VectorOfElements & a,
284 const VectorOfElements & b,
289 VectorOfElements minAbs(
const VectorOfElements & a,
290 const VectorOfElements & b);
294 VectorOfElements
max(
const VectorOfElements & a,
295 const VectorOfElements & b);
299 VectorOfElements
max(
const VectorOfElements & a,
300 const VectorOfElements & b,
305 VectorOfElements
copysign(
const VectorOfElements & a,
306 const VectorOfElements & b);
310 VectorOfElements
copysign(
const VectorOfElements & a,
311 const VectorOfElements & b,
316 VectorOfElements
sign(
const VectorOfElements & a);
322 VectorOfElements
excerpt(
const VectorOfElements & source,
323 const VectorOfElements & filter);
334 VectorOfElements
select(
const VectorOfElements & a,
335 const VectorOfElements & b,
336 const VectorOfElements & c);
346 VectorOfElements
select(
const VectorOfElements & a,
347 const VectorOfElements & b,
348 const VectorOfElements & c,
359 VectorOfElements
select(
const VectorOfElements & b,
360 const VectorOfElements & c,
367 VectorOfElements
mad(
const VectorOfElements & a,
368 const VectorOfElements & b,
369 const VectorOfElements & c);
375 VectorOfElements
mad(
const VectorOfElements & a,
376 const VectorOfElements & b,
377 const VectorOfElements & c,
382 VectorOfElements
log(
const VectorOfElements & a);
387 VectorOfElements
log10(
const VectorOfElements & a);
392 VectorOfElements
powI(
const VectorOfElements & a,
unsigned int i);
397 VectorOfElements
exp(
const VectorOfElements & a);
401 VectorOfElements
sqrt(
const VectorOfElements & a);
405 VectorOfElements
rsqrt(
const VectorOfElements & a);
409 VectorOfElements
fabs(
const VectorOfElements & a);
413 VectorOfElements
abs(
const VectorOfElements & a);
417 VectorOfElements
abs_diff(
const VectorOfElements & a,
const VectorOfElements & b);
421 VectorOfElements
floor(
const VectorOfElements & a);
429 VectorOfElements minElement(
const VectorOfElements & a);
433 VectorOfElements minAbsElement(
const VectorOfElements & a);
437 VectorOfElements maxElement(
const VectorOfElements & a);
445 VectorOfElements andOfElements(
const VectorOfElements & a);
449 VectorOfElements orOfElements(
const VectorOfElements & a);
466 VectorOfElements cat(
const VectorOfElements & a,
467 const VectorOfElements & b);
484 VectorOfElementsData cat(
const VectorOfElementsData & a,
485 const VectorOfElementsData & b);
507 VectorOfElements cat(
const VectorOfElements & a,
508 const VectorOfElements & b,
509 const VectorOfElements & c);
513 VectorOfElements cat(
const VectorOfElements * a,
518 VectorOfElements catN(
const VectorOfElements & a,
525 template <
typename T> VectorOfElements
operator+=(
const VectorOfElements & a,
533 template <
typename T> VectorOfElements
operator-=(
const VectorOfElements & a,
542 template <
typename T> VectorOfElements
operator*=(
const VectorOfElements & a,
551 template <
typename T> VectorOfElements
operator/=(
const VectorOfElements & a,
560 template <
typename T> VectorOfElements
operator+(
const VectorOfElements & a,
569 template <
typename T> VectorOfElements
operator+(
const T & a,
570 const VectorOfElements & b);
577 template <
typename T> VectorOfElements
operator-(
const VectorOfElements & a,
585 template <
typename T> VectorOfElements
operator-(
const T & a,
586 const VectorOfElements & b);
593 template <
typename T> VectorOfElements
operator*(
const VectorOfElements & a,
601 template <
typename T> VectorOfElements
operator*(
const T & a,
602 const VectorOfElements & b);
610 template <
typename T> VectorOfElements
operator/(
const VectorOfElements & a,
618 template <
typename T> VectorOfElements
operator%(
const VectorOfElements & a,
626 template <
typename T> VectorOfElements
operator/(
const T & b,
627 const VectorOfElements & a);
634 template <
typename T> VectorOfElements
operator%(
const T & b,
635 const VectorOfElements & a);
642 template <
typename T> VectorOfElements
operator>(
const VectorOfElements & a,
651 template <
typename T> VectorOfElements
operator>(
const T & b,
652 const VectorOfElements & a);
660 template <
typename T> VectorOfElements
operator<(
const VectorOfElements & a,
669 template <
typename T> VectorOfElements
operator<(
const T & b,
670 const VectorOfElements & a);
677 template <
typename T> VectorOfElements
operator>=(
const VectorOfElements & a,
686 template <
typename T> VectorOfElements
operator>=(
const T & b,
687 const VectorOfElements & a);
694 template <
typename T> VectorOfElements
operator<=(
const VectorOfElements & a,
703 template <
typename T> VectorOfElements
operator<=(
const T & b,
704 const VectorOfElements & a);
711 template <
typename T> VectorOfElements
operator==(
const VectorOfElements & a,
720 template <
typename T> VectorOfElements
operator==(
const T & b,
721 const VectorOfElements & a);
729 template <
typename T> VectorOfElements
operator!=(
const VectorOfElements & a,
737 template <
typename T> VectorOfElements
operator!=(
const T & b,
738 const VectorOfElements & a);
742 vector<Element>
gcNormalize(
const VectorOfElements & a);
744 vector<Element>
gcLength2(
const VectorOfElements & a,
const VectorOfElements &
l2);
746 vector<Element>
gcLength(
const VectorOfElements & a,
const VectorOfElements & l);
759 #endif // ACLVECTORELEMENTSOPERATIONS_H Element abs_diff(Element a, Element b)
const AVec< T > divisionOfElements(const AVec< T > &a, const AVec< T > &b)
Advanced Computational Language.
vector< Element > gcLength2(const VectorOfElements &a, const VectorOfElements &l2)
generates code corresponding . Result will be stored in l2
Element operator+(Element e1, Element e2)
Element operator+=(Element e1, Element e2)
const AVec< T > crossProduct(const AVec< T > &a, const AVec< T > &b)
Element operator>(Element e1, Element e2)
Element max(Element a, Element b)
Element min(Element a, Element b)
bool operator==(const std::vector< T > &vector1, const std::vector< T > &vector2)
Compares two vectors.
Element operator/(Element e1, Element e2)
Element operator!(Element e)
T productOfElements(const AVec< T > &a)
Element operator-(Element e)
Element operator||(Element e1, Element e2)
shared_ptr< VectorOfElements > SPVectorOfElements
shared_ptr< VectorOfElementsData > SPVectorOfElementsData
Element mad(Element e1, Element e2, Element e3)
std::shared_ptr< MemBlock > ElementData
VectorOfElements l2(const VectorOfElements &a)
Element copysign(Element a, Element b)
Element select(Element e1, Element e2, Element e3)
Element operator>=(Element e1, Element e2)
T sumOfElements(const AVec< T > &a)
acl::TypeID type(acl::typeToTypeID< FlT >())
The class represents several Element.
void swapBuffers(std::shared_ptr< Array< T > >a, std::shared_ptr< Array< T > > b)
vector< Element > gcNormalize(const VectorOfElements &a)
generates code corresponding
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)
std::shared_ptr< ElementBase > Element
Element excerpt(Element source, Element filter)
Element operator*=(Element e1, Element e2)
Element convert(const TypeID tName, Element e1, bool strong=true)
Element operator-=(Element e1, Element e2)
vector< Element > gcLength(const VectorOfElements &a, const VectorOfElements &l)
generates code corresponding . Result will be stored in l
void copy(MemBlock &source, T *destination)
void initData(Element a, Element initializationValue, const KernelConfiguration &kernelConfig=KERNEL_BASIC)
const bool operator!=(const AVec< T > &a, const AVec< T > &b)
Element operator*(Element e1, Element e2)
Element operator%(Element e1, Element e2)
Element operator<=(Element e1, Element e2)
SPDataWithGhostNodesACLData clone(SPDataWithGhostNodesACLData d)