aclGenerators.h
Go to the documentation of this file.
/*
* 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
{
template <typename T> VectorOfElements generateVEConstant(T a);
template <typename T> VectorOfElements generateVEConstant(T a, T b);
template <typename T> VectorOfElements generateVEConstant(T a, T b, T c);
template <typename T> VectorOfElements generateVEConstantN(unsigned int n, T a);
template <typename T> VectorOfElements generateVEConstant(unsigned int n, const T* const a);
template <typename T> VectorOfElements generateVEConstant(const std::vector<T> & a);
template <typename T> VectorOfElements generateVEConstant(const asl::AVec<T> & a);
template <typename T> MatrixOfElements generateMEConstant(const asl::AMatr<T> & a);
template <typename T> VectorOfElementsData generateVEData(unsigned int length,
unsigned int nComponents,
CommandQueue queue);
template <typename T> VectorOfElementsData generateVEData(unsigned int length,
unsigned int nComponents = 1);
VectorOfElementsData generateVEData(unsigned int length,
TypeID typeID,
unsigned int nComponents,
CommandQueue queue);
VectorOfElementsData generateVEData(unsigned int length,
TypeID typeID,
unsigned int nComponents = 1);
VectorOfElements generateVELocalArray(unsigned int componentSize,
TypeID typeID,
unsigned int size);
template <typename T> VectorOfElements generateVEPrivateArray(const vector<T> & data);
template <typename T> VectorOfElements generateVEPrivateArray(const vector<asl::AVec<T>> & data);
template <typename T> VectorOfElements generateVEPrivateArray(const vector<T> & data,
TypeID typeID);
template <typename T> VectorOfElements generateVEPrivateArray(const vector<asl::AVec<T>> & data,
TypeID typeID);
template <typename T> VectorOfElements generateVEDataSub(T,
unsigned int sublength,
unsigned int length,
unsigned int nComponents,
CommandQueue queue);
template <typename T> VectorOfElements generateVEVariableR(T& a);
template <typename T> VectorOfElements generateVEVariableR(T& a, T& b);
template <typename T> VectorOfElements generateVEVariableR(T& a, T& b, T& c);
template <typename T> VectorOfElements generateVEVariableR(asl::AVec<T>& a);
template <typename T> VectorOfElements generateVEVariableSP(std::shared_ptr<T> a);
template <typename T> VectorOfElements generateVEVariableSP(std::shared_ptr<T> a, std::shared_ptr<T> b);
template <typename T> VectorOfElements generateVEVariableSP(std::shared_ptr<T> a, std::shared_ptr<T> b, std::shared_ptr<T> c);
template <typename T> VectorOfElements generateVEVariableSP(std::shared_ptr<asl::AVec<T>> a);
template <typename T> VectorOfElements generateVEPrivateVariable(unsigned int n);
VectorOfElements generateVEPrivateVariable(unsigned int n, TypeID t);
MatrixOfElements generateMEPrivateVariable(unsigned int nR, unsigned int nC, TypeID t);
VectorOfElements generateVESubElements(VectorOfElements a, unsigned int length, int offset);
VectorOfElements generateVESubElements(VectorOfElements a, unsigned int length, VectorOfElements offset);
VectorOfElements generateVEShftedElements(VectorOfElements a, int offset);
VectorOfElements generateVEShftedElements(VectorOfElements a, const std::vector<int> & offset);
VectorOfElements generateVEShiftedElements(VectorOfElements a, VectorOfElements offset);
VectorOfElements generateVEPolynom(VectorOfElements x, VectorOfElements coefs);
VectorOfElements generateParsedVE(const VectorOfElements & fields,
const vector<string> & names,
const string & statement);
template <typename T=int>MatrixOfElements generateMEUnit(unsigned int n);
MatrixOfElements generateMEDiagonal(const VectorOfElements & d);
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);
VectorOfElements generateVEIndex(unsigned int size = 0);
VectorOfElements generateVEGroupID();
VectorOfElements generateVEIndexExt(unsigned int size = 0);
} //namespace acl
#endif // ACLGENERATORS_H
asl::AMatr
Definition: aslMatrices.h:39
asl::AVec
Definition: aslVectorsDynamicLength.h:40
asl::offset
const Block offset(const Block &bl, int a=1)
acl::generateMEConstant
MatrixOfElements generateMEConstant(const asl::AMatr< T > &a)
Generates VectorOfElements correspondinng to a.
acl::generateMEGivensRotation
MatrixOfElements generateMEGivensRotation(unsigned int k, unsigned int l, const VectorOfElements &sc)
acl::generateMEUnit
MatrixOfElements generateMEUnit(unsigned int n)
acl::generateMEDiagonal
MatrixOfElements generateMEDiagonal(const VectorOfElements &d)
acl::generateMEPrivateVariable
MatrixOfElements generateMEPrivateVariable(unsigned int nR, unsigned int nC, TypeID t)
Generates VectorOfElements with n Element of acl::PrivateVariable with type t.
acl::generateVEConstantN
VectorOfElements generateVEConstantN(unsigned int n, T a)
Generates VectorOfElements with n Elements acl::Constant with values a.
acl::generateVEData
VectorOfElementsData generateVEData(unsigned int length, unsigned int nComponents, CommandQueue queue)
Generates VectorOfElements with nComponents Elements acl::Vector with size length.
acl::generateVESubElements
VectorOfElements generateVESubElements(VectorOfElements a, unsigned int length, int offset)
Generates VectorOfElements which contains SubElements of the corresponding element of a.
acl::generateVEShftedElements
VectorOfElements generateVEShftedElements(VectorOfElements a, int offset)
Generates VectorOfElements which contains SubElements of the corresponding element of a.
acl::generateVEPrivateArray
VectorOfElements generateVEPrivateArray(const vector< T > &data)
Generates VectorOfElements with size Elements acl::PrivateArray of type with data defined by data.
acl::generateVEConstant
VectorOfElements generateVEConstant(T a)
Generates VectorOfElements with 1 Element acl::Constant with value a.
acl::generateVELocalArray
VectorOfElements generateVELocalArray(unsigned int componentSize, TypeID typeID, unsigned int size)
Generates VectorOfElements with size Elements acl::LocalArray of type typeID with size componentSize.
acl::generateVEGroupID
VectorOfElements generateVEGroupID()
acl::generateVEIndexExt
VectorOfElements generateVEIndexExt(unsigned int size=0)
acl::generateVEPrivateVariable
VectorOfElements generateVEPrivateVariable(unsigned int n)
Generates VectorOfElements with n Element of acl::PrivateVariable.
acl::generateVEVariableSP
VectorOfElements generateVEVariableSP(std::shared_ptr< T > a)
Generates VectorOfElements with 1 Element acl::VariableReference with reference on a.
acl::generateVEPolynom
VectorOfElements generateVEPolynom(VectorOfElements x, VectorOfElements coefs)
acl::generateVEShiftedElements
VectorOfElements generateVEShiftedElements(VectorOfElements a, VectorOfElements offset)
Generates VectorOfElements which contains SubElements of the corresponding element of a.
acl::generateVEVariableR
VectorOfElements generateVEVariableR(T &a)
Generates VectorOfElements with 1 Element acl::VariableReference with reference on a.
acl::generateVEDataSub
VectorOfElements generateVEDataSub(T, unsigned int sublength, unsigned int length, unsigned int nComponents, CommandQueue queue)
Generates VectorOfElements with nComponents Elements acl::Subvector with size sublength....
acl::generateVEIndex
VectorOfElements generateVEIndex(unsigned int size=0)
acl
Advanced Computational Language.
Definition: acl.h:41
acl::indexDependedConstant
VectorOfElements indexDependedConstant(vector< unsigned int > r, vector< T > values)
acl::CommandQueue
std::shared_ptr< cl::CommandQueue > CommandQueue
Definition: acl.h:51
acl::generateParsedVE
VectorOfElements generateParsedVE(const VectorOfElements &fields, const vector< string > &names, const string &statement)
acl::TypeID
TypeID
Definition: aclTypes.h:39