ASL 0.1.7
Advanced Simulation Library
Loading...
Searching...
No Matches
aclGenerators.h
Go to the documentation of this file.
1/*
2 * Advanced Simulation Library <http://asl.org.il>
3 *
4 * Copyright 2015 Avtech Scientific <http://avtechscientific.com>
5 *
6 *
7 * This file is part of Advanced Simulation Library (ASL).
8 *
9 * ASL is free software: you can redistribute it and/or modify it
10 * under the terms of the GNU Affero General Public License as
11 * published by the Free Software Foundation, version 3 of the License.
12 *
13 * ASL is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Affero General Public License for more details.
17 *
18 * You should have received a copy of the GNU Affero General Public License
19 * along with ASL. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23
24#ifndef ACLGENERATORS_H
25#define ACLGENERATORS_H
26
29#include <math/aslVectors.h>
30#include <math/aslMatrices.h>
31
32
33namespace acl
34{
36 template <typename T> VectorOfElements generateVEConstant(T a);
38 template <typename T> VectorOfElements generateVEConstant(T a, T b);
40 template <typename T> VectorOfElements generateVEConstant(T a, T b, T c);
42 template <typename T> VectorOfElements generateVEConstantN(unsigned int n, T a);
44 template <typename T> VectorOfElements generateVEConstant(unsigned int n, const T* const a);
46 template <typename T> VectorOfElements generateVEConstant(const std::vector<T> & a);
48 template <typename T> VectorOfElements generateVEConstant(const asl::AVec<T> & a);
50 template <typename T> MatrixOfElements generateMEConstant(const asl::AMatr<T> & a);
51
53 template <typename T> VectorOfElementsData generateVEData(unsigned int length,
54 unsigned int nComponents,
55 CommandQueue queue);
56
58 template <typename T> VectorOfElementsData generateVEData(unsigned int length,
59 unsigned int nComponents = 1);
60
63 TypeID typeID,
64 unsigned int nComponents,
65 CommandQueue queue);
66
69 TypeID typeID,
70 unsigned int nComponents = 1);
71
72
74 VectorOfElements generateVELocalArray(unsigned int componentSize,
75 TypeID typeID,
76 unsigned int size);
77
79 template <typename T> VectorOfElements generateVEPrivateArray(const vector<T> & data);
81 template <typename T> VectorOfElements generateVEPrivateArray(const vector<asl::AVec<T>> & data);
82
84 template <typename T> VectorOfElements generateVEPrivateArray(const vector<T> & data,
85 TypeID typeID);
87 template <typename T> VectorOfElements generateVEPrivateArray(const vector<asl::AVec<T>> & data,
88 TypeID typeID);
89
91 template <typename T> VectorOfElements generateVEDataSub(T,
92 unsigned int sublength,
93 unsigned int length,
94 unsigned int nComponents,
95 CommandQueue queue);
96
98 template <typename T> VectorOfElements generateVEVariableR(T& a);
100 template <typename T> VectorOfElements generateVEVariableR(T& a, T& b);
102 template <typename T> VectorOfElements generateVEVariableR(T& a, T& b, T& c);
105
106
108 template <typename T> VectorOfElements generateVEVariableSP(std::shared_ptr<T> a);
110 template <typename T> VectorOfElements generateVEVariableSP(std::shared_ptr<T> a, std::shared_ptr<T> b);
112 template <typename T> VectorOfElements generateVEVariableSP(std::shared_ptr<T> a, std::shared_ptr<T> b, std::shared_ptr<T> c);
114 template <typename T> VectorOfElements generateVEVariableSP(std::shared_ptr<asl::AVec<T>> a);
115
116
118 template <typename T> VectorOfElements generateVEPrivateVariable(unsigned int n);
119
122
124 MatrixOfElements generateMEPrivateVariable(unsigned int nR, unsigned int nC, TypeID t);
125
126
128 VectorOfElements generateVESubElements(VectorOfElements a, unsigned int length, int offset);
129
132
135
137 VectorOfElements generateVEShftedElements(VectorOfElements a, const std::vector<int> & offset);
138
141
144
149
152 const vector<string> & names,
153 const string & statement);
154
155
157 template <typename T=int>MatrixOfElements generateMEUnit(unsigned int n);
158
161
163
167 unsigned int l,
168 const VectorOfElements & sc);
169
170
171 // insert local variable which takes values accoding to index \ingroup generateVE
172 template <typename T> VectorOfElements indexDependedConstant(vector<unsigned int> r,
173 vector<T> values);
174
175
178 VectorOfElements generateVEIndex(unsigned int size = 0);
179
183
186 VectorOfElements generateVEIndexExt(unsigned int size = 0);
187
188} //namespace acl
189
190#endif // ACLGENERATORS_H
Matrices.
definition of class АVec<T>
The class represents a matrix elements of Element.
The class represents several ElementData.
The class represents several Element.
MatrixOfElements generateMEConstant(const asl::AMatr< T > &a)
Generates VectorOfElements correspondinng to a.
MatrixOfElements generateMEGivensRotation(unsigned int k, unsigned int l, const VectorOfElements &sc)
MatrixOfElements generateMEUnit(unsigned int n)
MatrixOfElements generateMEDiagonal(const VectorOfElements &d)
MatrixOfElements generateMEPrivateVariable(unsigned int nR, unsigned int nC, TypeID t)
Generates VectorOfElements with n Element of acl::PrivateVariable with type t.
VectorOfElements generateVEConstantN(unsigned int n, T a)
Generates VectorOfElements with n Elements acl::Constant with values a.
VectorOfElementsData generateVEData(unsigned int length, unsigned int nComponents, CommandQueue queue)
Generates VectorOfElements with nComponents Elements acl::Vector with size length.
VectorOfElements generateVESubElements(VectorOfElements a, unsigned int length, int offset)
Generates VectorOfElements which contains SubElements of the corresponding element of a.
VectorOfElements generateVEShftedElements(VectorOfElements a, int offset)
Generates VectorOfElements which contains SubElements of the corresponding element of a.
VectorOfElements generateVEPrivateArray(const vector< T > &data)
Generates VectorOfElements with size Elements acl::PrivateArray of type with data defined by data.
VectorOfElements generateVEConstant(T a)
Generates VectorOfElements with 1 Element acl::Constant with value a.
VectorOfElements generateVELocalArray(unsigned int componentSize, TypeID typeID, unsigned int size)
Generates VectorOfElements with size Elements acl::LocalArray of type typeID with size componentSize.
VectorOfElements generateVEGroupID()
VectorOfElements generateVEIndexExt(unsigned int size=0)
VectorOfElements generateVEPrivateVariable(unsigned int n)
Generates VectorOfElements with n Element of acl::PrivateVariable.
VectorOfElements generateVEVariableSP(std::shared_ptr< T > a)
Generates VectorOfElements with 1 Element acl::VariableReference with reference on a.
VectorOfElements generateVEPolynom(VectorOfElements x, VectorOfElements coefs)
VectorOfElements generateVEShiftedElements(VectorOfElements a, VectorOfElements offset)
Generates VectorOfElements which contains SubElements of the corresponding element of a.
VectorOfElements generateVEVariableR(T &a)
Generates VectorOfElements with 1 Element acl::VariableReference with reference on a.
VectorOfElements generateVEDataSub(T, unsigned int sublength, unsigned int length, unsigned int nComponents, CommandQueue queue)
Generates VectorOfElements with nComponents Elements acl::Subvector with size sublength....
VectorOfElements generateVEIndex(unsigned int size=0)
Advanced Computational Language.
Definition: acl.h:41
VectorOfElements indexDependedConstant(vector< unsigned int > r, vector< T > values)
std::shared_ptr< cl::CommandQueue > CommandQueue
Definition: acl.h:51
VectorOfElements generateParsedVE(const VectorOfElements &fields, const vector< string > &names, const string &statement)
TypeID
Definition: aclTypes.h:39