/usr/include/ASL/acl/aclGenerators.h is in libasl-dev 0.1.6-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | /*
* Advanced Simulation Library <http://asl.org.il>
*
* Copyright 2015 Avtech Scientific <http://avtechscientific.com>
*
*
* This file is part of Advanced Simulation Library (ASL).
*
* ASL is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, version 3 of the License.
*
* ASL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with ASL. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef ACLGENERATORS_H
#define ACLGENERATORS_H
#include "aclMath/aclVectorOfElementsDef.h"
#include "aclMath/aclMatrixOfElements.h"
#include <math/aslVectors.h>
#include <math/aslMatrices.h>
namespace acl
{
/// Generates VectorOfElements with 1 Element acl::Constant with value a \ingroup generateVE
template <typename T> VectorOfElements generateVEConstant(T a);
/// Generates VectorOfElements with 2 Elements acl::Constant with values a and b \ingroup generateVE
template <typename T> VectorOfElements generateVEConstant(T a, T b);
/// Generates VectorOfElements with 3 Elements acl::Constant with values a,b and c \ingroup generateVE
template <typename T> VectorOfElements generateVEConstant(T a, T b, T c);
/// Generates VectorOfElements with n Elements acl::Constant with values a \ingroup generateVE
template <typename T> VectorOfElements generateVEConstantN(unsigned int n, T a);
/// Generates VectorOfElements with \p n Elements acl::Constant with values a[i] \ingroup generateVE
template <typename T> VectorOfElements generateVEConstant(unsigned int n, const T* const a);
/// Generates VectorOfElements with a.size() Elements acl::Constant with values a[i] \ingroup generateVE
template <typename T> VectorOfElements generateVEConstant(const std::vector<T> & a);
/// Generates VectorOfElements correspondinng to \p a \ingroup generateVE
template <typename T> VectorOfElements generateVEConstant(const asl::AVec<T> & a);
/// Generates VectorOfElements correspondinng to \p a \ingroup generateME
template <typename T> MatrixOfElements generateMEConstant(const asl::AMatr<T> & a);
/// Generates VectorOfElements with \p nComponents Elements acl::Vector with size \p length \ingroup generateVE
template <typename T> VectorOfElementsData generateVEData(unsigned int length,
unsigned int nComponents,
CommandQueue queue);
/// Generates VectorOfElements with \p nComponents Elements acl::Vector with size \p length and default queue \ingroup generateVE
template <typename T> VectorOfElementsData generateVEData(unsigned int length,
unsigned int nComponents = 1);
/// Generates VectorOfElementsData with \p nComponents Elements acl::Array of type \p with size \p length \ingroup generateVE
VectorOfElementsData generateVEData(unsigned int length,
TypeID typeID,
unsigned int nComponents,
CommandQueue queue);
/// Generates VectorOfElementsData with \p nComponents Elements acl::Array of type \p with size \p length and default queue \ingroup generateVE
VectorOfElementsData generateVEData(unsigned int length,
TypeID typeID,
unsigned int nComponents = 1);
/// Generates VectorOfElements with \p size Elements acl::LocalArray of type \p typeID with size \p componentSize \ingroup generateVE
VectorOfElements generateVELocalArray(unsigned int componentSize,
TypeID typeID,
unsigned int size);
/// Generates VectorOfElements with \p size Elements acl::PrivateArray of type \p with data defined by \p data \ingroup generateVE
template <typename T> VectorOfElements generateVEPrivateArray(const vector<T> & data);
/// Generates VectorOfElements with \p size Elements acl::PrivateArray of type \p with data defined by \p data \ingroup generateVE
template <typename T> VectorOfElements generateVEPrivateArray(const vector<asl::AVec<T>> & data);
/// Generates VectorOfElements with \p size Elements acl::PrivateArray of type \p with size \p componentSize \ingroup generateVE
template <typename T> VectorOfElements generateVEPrivateArray(const vector<T> & data,
TypeID typeID);
/// Generates VectorOfElements with \p size Elements acl::PrivateArray of type \p with size \p componentSize \ingroup generateVE
template <typename T> VectorOfElements generateVEPrivateArray(const vector<asl::AVec<T>> & data,
TypeID typeID);
/// Generates VectorOfElements with \p nComponents Elements acl::Subvector with size \p sublength. \p length is the vector size \ingroup generateVE
template <typename T> VectorOfElements generateVEDataSub(T,
unsigned int sublength,
unsigned int length,
unsigned int nComponents,
CommandQueue queue);
/// Generates VectorOfElements with 1 Element acl::VariableReference with reference on \p a \ingroup generateVE
template <typename T> VectorOfElements generateVEVariableR(T& a);
/// Generates VectorOfElements with 2 Element acl::VariableReference with references on \p a and \p b \ingroup generateVE
template <typename T> VectorOfElements generateVEVariableR(T& a, T& b);
/// Generates VectorOfElements with 3 Element acl::VariableReference with references on \p a, \p b and \p c \ingroup generateVE
template <typename T> VectorOfElements generateVEVariableR(T& a, T& b, T& c);
/// Generates VectorOfElements with nD(a) Element acl::VariableReference with reference on \p a[i] \ingroup generateVE
template <typename T> VectorOfElements generateVEVariableR(asl::AVec<T>& a);
/// Generates VectorOfElements with 1 Element acl::VariableReference with reference on \p a \ingroup generateVE
template <typename T> VectorOfElements generateVEVariableSP(std::shared_ptr<T> a);
/// Generates VectorOfElements with 2 Element acl::VariableReference with references on \p a and \p b \ingroup generateVE
template <typename T> VectorOfElements generateVEVariableSP(std::shared_ptr<T> a, std::shared_ptr<T> b);
/// Generates VectorOfElements with 3 Element acl::VariableReference with references on \p a, \p b and \p c \ingroup generateVE
template <typename T> VectorOfElements generateVEVariableSP(std::shared_ptr<T> a, std::shared_ptr<T> b, std::shared_ptr<T> c);
/// Generates VectorOfElements with nD(a) Element acl::VariableReference with reference on \p a[i] \ingroup generateVE
template <typename T> VectorOfElements generateVEVariableSP(std::shared_ptr<asl::AVec<T>> a);
/// Generates VectorOfElements with \p n Element of acl::PrivateVariable \ingroup generateVE
template <typename T> VectorOfElements generateVEPrivateVariable(unsigned int n);
/// Generates VectorOfElements with \p n Element of acl::PrivateVariable with type \p t \ingroup generateVE
VectorOfElements generateVEPrivateVariable(unsigned int n, TypeID t);
/// Generates VectorOfElements with \p n Element of acl::PrivateVariable with type \p t \ingroup generateME
MatrixOfElements generateMEPrivateVariable(unsigned int nR, unsigned int nC, TypeID t);
/// Generates VectorOfElements which contains SubElements of the corresponding element of \p a \ingroup generateVE
VectorOfElements generateVESubElements(VectorOfElements a, unsigned int length, int offset);
/// Generates VectorOfElements which contains SubElements of the corresponding element of \p a \ingroup generateVE
VectorOfElements generateVESubElements(VectorOfElements a, unsigned int length, VectorOfElements offset);
/// Generates VectorOfElements which contains SubElements of the corresponding element of \p a \ingroup generateVE
VectorOfElements generateVEShftedElements(VectorOfElements a, int offset);
/// Generates VectorOfElements which contains SubElements of the corresponding element of \p a \ingroup generateVE
VectorOfElements generateVEShftedElements(VectorOfElements a, const std::vector<int> & offset);
/// Generates VectorOfElements which contains SubElements of the corresponding element of \p a \ingroup generateVE
VectorOfElements generateVEShiftedElements(VectorOfElements a, VectorOfElements offset);
/// Generates VectorOfElements which 1 element correspond to polynom for \p x with \p coefs \ingroup generateVE
/// The polinom is \f$ x^{n-1}*coefs_0+x^{n-2}coefs_1+...+coefs_{n-1} \f$
/**
The polynom contains mad fanction with type specification the type is
defined by \p x
*/
VectorOfElements generateVEPolynom(VectorOfElements x, VectorOfElements coefs);
///
VectorOfElements generateParsedVE(const VectorOfElements & fields,
const vector<string> & names,
const string & statement);
/// \ingroup generateME
template <typename T=int>MatrixOfElements generateMEUnit(unsigned int n);
/// \ingroup generateME
MatrixOfElements generateMEDiagonal(const VectorOfElements & d);
/// \ingroup generateME
/**
\param sc contains sin and cos values
*/
MatrixOfElements generateMEGivensRotation(unsigned int k,
unsigned int l,
const VectorOfElements & sc);
// insert local variable which takes values accoding to index \ingroup generateVE
template <typename T> VectorOfElements indexDependedConstant(vector<unsigned int> r,
vector<T> values);
/// Generates VectorOfElements with one Element of type Index
/// \ingroup generateVE
VectorOfElements generateVEIndex(unsigned int size = 0);
/// Generates VectorOfElements with one Element of type GroupID
/// \ingroup generateVE
VectorOfElements generateVEGroupID();
/// Generates VectorOfElements with one Element of type Index
/// \ingroup generateVE
VectorOfElements generateVEIndexExt(unsigned int size = 0);
} //namespace acl
#endif // ACLGENERATORS_H
|