acl Namespace Reference

Advanced Computational Language. More...

## Namespaces

| elementOperators
| definitions of mathematical operators and functions for class Element

## Classes

class | Array
| Global array. More...
class | ElementBase
class | Hardware
| Provides access to the underlying hardware. More...
class | Barycentric
| realizes Barycentric algorithms for triangles generated within Kernel More...
class | ComplexNumOfElements
| The class represents a matrix elements of Element. More...
class | MatrixOfElements
| The class represents a matrix elements of Element. More...
class | QuaternionOfElements
| The class represents a matrix elements of Element. More...
class | ReductionAlgGenerator
| The class generates code corresponding to a reduction operation of elements. More...
class | VectorOfElementsData
| The class represents several ElementData. More...
class | VectorOfElements
| The class represents several Element. More...
class | Constant
class | GroupID
class | Index
class | IndexExt
class | LocalArray
class | MemBlock
class | PrivateArray
class | PrivateVariable
class | Subvector
class | Variable
class | VariableReference
class | VariableSP
class | ExpressionContainer
class | Kernel
| OpenCl Kernel generator. More...
class | KernelConfiguration
| ACL Kernel configuration class. More...
class | KernelMerger
| OpenCl Kernel merger. More...
class | ElementAssignmentSafe
class | ElementConvert
| realizes `convert_` functionality More...
class | ElementCos
class | ElementDivision
class | ElementExcerpt
class | ElementFor
| For loop. More...
class | ElementGenericBinary
class | ElementGenericBinaryFunction
class | ElementGenericUnary
class | ElementGenericUnarySIMD
class | ElementIfElse
| If-Else conditional structure. More...
class | ElementMad
| The class is realization of the `mad` operation. More...
class | ElementParser
class | ElementProduct
class | ElementSelect
class | ElementSin
class | ElementSqrt
class | ElementSubtraction
class | ElementSum
class | ElementSyncCopy
class | ElementGenericAtomicFunction
class | OperatorBinary
class | OperatorGeneric
class | OperatorTernary
class | OperatorUnary

## Typedefs

typedef std::shared_ptr< MemBlock > | ElementData
typedef std::shared_ptr< ElementBase > | Element
typedef std::shared_ptr< cl::CommandQueue > | CommandQueue
typedef shared_ptr< VectorOfElementsData > | SPVectorOfElementsData
typedef shared_ptr< VectorOfElements > | SPVectorOfElements
typedef shared_ptr< Array< cl_int > > | ElementArrayInt
typedef shared_ptr< Array< cl_float > > | ElementArrayFloat
typedef shared_ptr< Array< cl_double > > | ElementArrayDouble
typedef shared_ptr< Array< cl_long > > | ElementArrayLong
typedef std::shared_ptr< Kernel > | SPKernel
typedef std::shared_ptr< acl::KernelMerger > | SPKernelMerger

## Enumerations

enum | ReductionOperatorType { ROT_SUM , ROT_PRODUCT , ROT_MINIMUM , ROT_MAXIMUM , ROT_SUM , ROT_PRODUCT , ROT_MINIMUM , ROT_MAXIMUM }
enum | Extension { CL_KHR_FP64 , CL_KHR_INT64_BASE_ATOMICS , CL_KHR_INT64_EXTENDED_ATOMICS , CL_KHR_GL_SHARING , CL_KHR_FP64 , CL_KHR_INT64_BASE_ATOMICS , CL_KHR_INT64_EXTENDED_ATOMICS , CL_KHR_GL_SHARING }
enum | TypeID { TYPE_INT , TYPE_UINT , TYPE_FLOAT , TYPE_DOUBLE , TYPE_LONG , TYPE_INT , TYPE_UINT , TYPE_FLOAT , TYPE_DOUBLE , TYPE_LONG }
enum | ReductionOperatorType { ROT_SUM , ROT_PRODUCT , ROT_MINIMUM , ROT_MAXIMUM , ROT_SUM , ROT_PRODUCT , ROT_MINIMUM , ROT_MAXIMUM }
enum | Extension { CL_KHR_FP64 , CL_KHR_INT64_BASE_ATOMICS , CL_KHR_INT64_EXTENDED_ATOMICS , CL_KHR_GL_SHARING , CL_KHR_FP64 , CL_KHR_INT64_BASE_ATOMICS , CL_KHR_INT64_EXTENDED_ATOMICS , CL_KHR_GL_SHARING }
enum | TypeID { TYPE_INT , TYPE_UINT , TYPE_FLOAT , TYPE_DOUBLE , TYPE_LONG , TYPE_INT , TYPE_UINT , TYPE_FLOAT , TYPE_DOUBLE , TYPE_LONG }

## Functions

bool | isConstant (Element e)
bool | isSingleValue (Element e)
| The function returns true when the input is a single valued object e.g. aclConstatnt, aclVariable. More...
bool | isMemBlock (Element e)
template<typename T >
void | copy (MemBlock &source, T *destination)
template<typename T >
void | copy (T *source, MemBlock &destination)
template<typename T >
void | copy (MemBlock &source, std::vector< T > &destination)
template<typename T >
void | copy (std::vector< T > &source, MemBlock &destination)
template<typename T >
void | copy (MemBlock &source, MemBlock &destination)
template<typename T >
void | copy (Element source, std::vector< T > &destination)
template<typename T >
void | copy (std::vector< T > &source, Element destination)
template<typename T >
void | copy (Element source, T *destination)
template<typename T >
void | copy (T *source, Element destination)
void | initData (Element a, Element initializationValue, const KernelConfiguration &kernelConfig=KERNEL_BASIC)
Element | generateSubElement (Element, unsigned int size, int offset)
| function creates subElement with given length and offset; offset is constant More...
Element | generateSubElement (Element, unsigned int size, int *offset)
| function creates subElement with given length and offset; offset can be a variable More...
Element | generateSubElement (Element, unsigned int size, Element offset)
Element | generateShiftedElement (Element, int offset)
Element | generateShiftedElement (Element, int *offset)
Element | generateShiftedElement (Element, Element offset)
template<typename T >
void | swapBuffers (std::shared_ptr< Array< T > >a, std::shared_ptr< Array< T > > b)
ElementData | generateElementArray (TypeID typeID, unsigned int size)
ElementData | generateElementArray (TypeID typeID, unsigned int size, CommandQueue queue_)
Element | generateElementLocalArray (TypeID typeID, unsigned int size)
template<typename T >
VectorOfElements | generateVEConstant (T a)
| Generates VectorOfElements with 1 Element acl::Constant with value a. More...
template<typename T >
VectorOfElements | generateVEConstant (T a, T b)
| Generates VectorOfElements with 2 Elements acl::Constant with values a and b. More...
template<typename T >
VectorOfElements | generateVEConstant (T a, T b, T c)
| Generates VectorOfElements with 3 Elements acl::Constant with values a,b and c. More...
template<typename T >
VectorOfElements | generateVEConstantN (unsigned int n, T a)
| Generates VectorOfElements with n Elements acl::Constant with values a. More...
template<typename T >
VectorOfElements | generateVEConstant (unsigned int n, const T *const a)
| Generates VectorOfElements with `n` Elements acl::Constant with values a[i]. More...
template<typename T >
VectorOfElements | generateVEConstant (const std::vector< T > &a)
| Generates VectorOfElements with a.size() Elements acl::Constant with values a[i]. More...
template<typename T >
VectorOfElements | generateVEConstant (const asl::AVec< T > &a)
| Generates VectorOfElements correspondinng to `a`. More...
template<typename T >
MatrixOfElements | generateMEConstant (const asl::AMatr< T > &a)
| Generates VectorOfElements correspondinng to `a`. More...
template<typename T >
VectorOfElementsData | generateVEData (unsigned int length, unsigned int nComponents, CommandQueue queue)
| Generates VectorOfElements with `nComponents` Elements acl::Vector with size `length`. More...
template<typename T >
VectorOfElementsData | generateVEData (unsigned int length, unsigned int nComponents=1)
| Generates VectorOfElements with `nComponents` Elements acl::Vector with size `length` and default queue. More...
VectorOfElementsData | generateVEData (unsigned int length, TypeID typeID, unsigned int nComponents, CommandQueue queue)
| Generates VectorOfElementsData with `nComponents` Elements acl::Array of type `with` size `length`. More...
VectorOfElementsData | generateVEData (unsigned int length, TypeID typeID, unsigned int nComponents=1)
| Generates VectorOfElementsData with `nComponents` Elements acl::Array of type `with` size `length` and default queue. More...
VectorOfElements | generateVELocalArray (unsigned int componentSize, TypeID typeID, unsigned int size)
| Generates VectorOfElements with `size` Elements acl::LocalArray of type `typeID` with size `componentSize`. More...
template<typename T >
VectorOfElements | generateVEPrivateArray (const vector< T > &data)
| Generates VectorOfElements with `size` Elements acl::PrivateArray of type `with` data defined by `data`. More...
template<typename T >
VectorOfElements | generateVEPrivateArray (const vector< asl::AVec< T >> &data)
| Generates VectorOfElements with `size` Elements acl::PrivateArray of type `with` data defined by `data`. More...
template<typename T >
VectorOfElements | generateVEPrivateArray (const vector< T > &data, TypeID typeID)
| Generates VectorOfElements with `size` Elements acl::PrivateArray of type `with` size `componentSize`. More...
template<typename T >
VectorOfElements | generateVEPrivateArray (const vector< asl::AVec< T >> &data, TypeID typeID)
| Generates VectorOfElements with `size` Elements acl::PrivateArray of type `with` size `componentSize`. More...
template<typename T >
VectorOfElements | generateVEDataSub (T, unsigned int sublength, unsigned int length, unsigned int nComponents, CommandQueue queue)
| Generates VectorOfElements with `nComponents` Elements acl::Subvector with size `sublength`. `length` is the vector size. More...
template<typename T >
VectorOfElements | generateVEVariableR (T &a)
| Generates VectorOfElements with 1 Element acl::VariableReference with reference on `a`. More...
template<typename T >
VectorOfElements | generateVEVariableR (T &a, T &b)
| Generates VectorOfElements with 2 Element acl::VariableReference with references on `a` and `b`. More...
template<typename T >
VectorOfElements | generateVEVariableR (T &a, T &b, T &c)
| Generates VectorOfElements with 3 Element acl::VariableReference with references on `a`, `b` and `c`. More...
template<typename T >
VectorOfElements | generateVEVariableR (asl::AVec< T > &a)
| Generates VectorOfElements with nD(a) Element acl::VariableReference with reference on `a`[i] <> More...
template<typename T >
VectorOfElements | generateVEVariableSP (std::shared_ptr< T > a)
| Generates VectorOfElements with 1 Element acl::VariableReference with reference on `a`. More...
template<typename T >
VectorOfElements | generateVEVariableSP (std::shared_ptr< T > a, std::shared_ptr< T > b)
| Generates VectorOfElements with 2 Element acl::VariableReference with references on `a` and `b`. More...
template<typename T >
VectorOfElements | generateVEVariableSP (std::shared_ptr< T > a, std::shared_ptr< T > b, std::shared_ptr< T > c)
| Generates VectorOfElements with 3 Element acl::VariableReference with references on `a`, `b` and `c`. More...
template<typename T >
VectorOfElements | generateVEVariableSP (std::shared_ptr< asl::AVec< T >> a)
| Generates VectorOfElements with nD(a) Element acl::VariableReference with reference on `a`[i] <> More...
template<typename T >
VectorOfElements | generateVEPrivateVariable (unsigned int n)
| Generates VectorOfElements with `n` Element of acl::PrivateVariable. More...
VectorOfElements | generateVEPrivateVariable (unsigned int n, TypeID t)
| Generates VectorOfElements with `n` Element of acl::PrivateVariable with type `t`. More...
MatrixOfElements | generateMEPrivateVariable (unsigned int nR, unsigned int nC, TypeID t)
| Generates VectorOfElements with `n` Element of acl::PrivateVariable with type `t`. More...
VectorOfElements | generateVESubElements (VectorOfElements a, unsigned int length, int offset)
| Generates VectorOfElements which contains SubElements of the corresponding element of `a`. More...
VectorOfElements | generateVESubElements (VectorOfElements a, unsigned int length, VectorOfElements offset)
| Generates VectorOfElements which contains SubElements of the corresponding element of `a`. More...
VectorOfElements | generateVEShftedElements (VectorOfElements a, int offset)
| Generates VectorOfElements which contains SubElements of the corresponding element of `a`. More...
VectorOfElements | generateVEShftedElements (VectorOfElements a, const std::vector< int > &offset)
| Generates VectorOfElements which contains SubElements of the corresponding element of `a`. More...
VectorOfElements | generateVEShiftedElements (VectorOfElements a, VectorOfElements offset)
| Generates VectorOfElements which contains SubElements of the corresponding element of `a`. More...
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)
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)
std::string | getPlatformVendor (const CommandQueue &queue)
std::string | getDeviceName (const CommandQueue &queue)
std::string | getDeviceVersion (const CommandQueue &queue)
std::string | getDriverVersion (const CommandQueue &queue)
cl_device_type | getDeviceType (const CommandQueue &queue)
cl_uint | getNComputeUnits (const CommandQueue &queue)
cl::Device | getDevice (const CommandQueue &queue)
cl::Context | getContext (const CommandQueue &queue)
unsigned int | getAlignment (const CommandQueue &queue)
cl_device_local_mem_type | getLocalMemoryType (const CommandQueue &queue)
cl_ulong | getLocalMemorySize (const CommandQueue &queue)
size_t | getMaxItemSize (const CommandQueue &queue)
cl_uint | getVectorWidth (const CommandQueue &queue, const TypeID typeID)
bool | extensionAvailable (const CommandQueue &queue, const Extension extension)
cl_device_fp_config | doublePrecisionSupport (const CommandQueue &queue)
cl_ulong | getKernelLocalMemSize (const Kernel &kernel)
cl_ulong | getKernelPrivateMemSize (const Kernel &kernel)
void | findNearestDirectionCode (const vector< asl::AVec<>> &directions, VectorOfElements v, VectorOfElements iDir, ExpressionContainer &k)
| generates code for finding nearest direction from given directions set `directions` More...
void | findNearestDirectionCode (const vector< asl::AVec<>> &directions, VectorOfElements v, VectorOfElements iDir, VectorOfElements scalProduct, ExpressionContainer &k)
| generates code for finding nearest direction from given directions set `directions` More...
VectorOfElements | differentSign (VectorOfElements v)
| generate expresion returning true if elements of v have different signs or one of them zerow More...
VectorOfElements | generateVEOutOfBoundarySafe (const VectorOfElements &a)
| generates Vector of elements wraping the `a` in order to avoid out of boundary acces More...
VectorOfElements | generateVEOutOfBoundarySafe (const VectorOfElements &a, const VectorOfElements &outVal)
| generates Vector of elements wraping the `a` in order to avoid out of boundary acces with given out of boundary value More...
VectorOfElements | solveSystem (const MatrixOfElements &a, const VectorOfElements &b)
| returns solution of a system of linear equations More...
vector< Element > | gcSolveSystem (const MatrixOfElements &a, const VectorOfElements &b, const VectorOfElements &x)
| generates code for solving the solution of a system of linear equations More...
vector< Element > | gcSolveSystemCG (const MatrixOfElements &a, const VectorOfElements &b, const VectorOfElements &x)
| generates code for solving the solution of a system of linear equations More...
QuaternionOfElements | normalize (QuaternionOfElements &a)
template<typename ResType >
std::shared_ptr< ReductionAlgGenerator< ResType, ROT_SUM > > | generateSumAlg (VectorOfElements v)
template<typename ResType >
std::shared_ptr< ReductionAlgGenerator< ResType, ROT_MINIMUM > > | generateMinAlg (VectorOfElements v)
template<typename ResType >
std::shared_ptr< ReductionAlgGenerator< ResType, ROT_MAXIMUM > > | generateMaxAlg (VectorOfElements v)
template<typename ResType >
std::shared_ptr< ReductionAlgGenerator< ResType, ROT_PRODUCT > > | generateProductAlg (VectorOfElements v)
bool | compatibleSizes (unsigned int s, const VectorOfElements &a)
vector< Element > | gcNormalize (const VectorOfElements &a)
| generates code corresponding \( \vec a /= |\vec a|\) More...
vector< Element > | gcLength2 (const VectorOfElements &a, const VectorOfElements &l2)
| generates code corresponding \( |\vec a|^2 \). Result will be stored in `l2` More...
vector< Element > | gcLength (const VectorOfElements &a, const VectorOfElements &l)
| generates code corresponding \( |\vec a| \). Result will be stored in `l` More...
VectorOfElements | l2 (const VectorOfElements &a)
bool | compatible (unsigned int size1, CommandQueue queue1, unsigned int size2, CommandQueue queue2)
bool | compatible (unsigned int size, CommandQueue queue, Element e)
bool | compatible (Element e1, Element e2)
bool | compatibleSizes (unsigned int s1, unsigned int s2)
| if `s` and size of `e` are the same or at least one of them is 0 More...
bool | compatibleSizes (Element e1, Element e2)
| if both elements have the same size or size of at least one of them is 0 More...
bool | compatibleSizes (unsigned int s, Element e)
| if `s` and size of `e` are the same or at least one of them is 0 More...
unsigned int | paddingBytes (unsigned int size, unsigned int typeSize, CommandQueue queue)
| Adds padding in bytes based on the device's alignment. More...
unsigned int | paddingElements (unsigned int size, const KernelConfiguration &kernelConfig)
| Adds padding in elements based on vector width. More...
bool | onSameDevice (CommandQueue queue1, CommandQueue queue2)
| checks whether both elements reside on the same device More...
bool | onSameDevice (CommandQueue queue, Element e)
bool | onSameDevice (Element e1, Element e2)
bool | isDeclarable (Element e)
bool | isArgument (Element e)
void | addElementToKernelSource (Element e, std::vector< Element > &arguments, std::vector< Element > &localDeclarations)
| adds `e` either to `arguments` or to `localDeclarations` More...
template<typename T >
const std::string & | typeToStr ()
template<typename T >
const std::string | typeToStr (unsigned int i)
template<typename T >
constexpr const TypeID | typeToTypeID ()
template<>
constexpr const TypeID | typeToTypeID< cl_double > ()
template<>
constexpr const TypeID | typeToTypeID< cl_float > ()
template<>
constexpr const TypeID | typeToTypeID< cl_int > ()
template<>
constexpr const TypeID | typeToTypeID< cl_uint > ()
template<>
constexpr const TypeID | typeToTypeID< cl_long > ()
void | swapBuffers (MemBlock &a, MemBlock &b)
template<typename T >
std::shared_ptr< T > | map (ElementData m)
void | createKernels (std::vector< SPKernel > &vk, unsigned int n, const KernelConfiguration &kernelConfig_)
void | copy (const vector< Element > &source, VectorOfElements &destination)
void | copy (const VectorOfElementsData &source, VectorOfElementsData &destination)

## Variables

const KernelConfiguration | KERNEL_BASIC
const std::string | INDEX
const std::vector< std::string > | TYPE
const std::vector< unsigned char > | TYPE_SIZE
const std::vector< TypeID > | TYPE_SELECT
| contains trasnlation of types necessery for use in the function select More...
Hardware | hardware
const KernelConfiguration | KERNEL_SIMD
const KernelConfiguration | KERNEL_SIMDUA

## Detailed Description

Advanced Computational Language.

Todo:
  {Add padding at the end?}

Todo:
  {Add padding at the end?}

## Typedef Documentation

## CommandQueue

typedef std::shared_ptr< cl::CommandQueue > acl::CommandQueue

Definition at line 51 of file acl.h.

## Element

typedef std::shared_ptr< ElementBase > acl::Element

Examples
  testASLData.cc, testKernel.cc, testKernelMerger.cc, testOperators.cc, and testPerformance.cc.

Definition at line 49 of file acl.h.

## ElementArrayDouble

typedef shared_ptr< Array< cl_double > > acl::ElementArrayDouble

Definition at line 58 of file aclArray.h.

## ElementArrayFloat

typedef shared_ptr< Array< cl_float > > acl::ElementArrayFloat

Definition at line 57 of file aclArray.h.

## ElementArrayInt

typedef shared_ptr< Array< cl_int > > acl::ElementArrayInt

Definition at line 56 of file aclArray.h.

## ElementArrayLong

typedef shared_ptr< Array< cl_long > > acl::ElementArrayLong

Definition at line 59 of file aclArray.h.

## ElementData

typedef shared_ptr< MemBlock > acl::ElementData

Examples
  testKernelMerger.cc.

Definition at line 48 of file acl.h.

## SPKernel

typedef std::shared_ptr< Kernel > acl::SPKernel

related

Examples
  testKernelMerger.cc.

Definition at line 35 of file aclKernelMerger.h.

## SPKernelMerger

typedef std::shared_ptr< KernelMerger > acl::SPKernelMerger

related

Definition at line 34 of file aslLBGKBC.h.

## SPVectorOfElements

typedef shared_ptr< VectorOfElements > acl::SPVectorOfElements

Definition at line 106 of file aclVectorOfElementsDef.h.

## SPVectorOfElementsData

typedef std::shared_ptr< VectorOfElementsData > acl::SPVectorOfElementsData

Definition at line 105 of file aclVectorOfElementsDef.h.

## Enumeration Type Documentation

## Extension [1/2]

enum acl::Extension

Enumerator
CL_KHR_FP64 |
CL_KHR_INT64_BASE_ATOMICS |
CL_KHR_INT64_EXTENDED_ATOMICS |
CL_KHR_GL_SHARING |
CL_KHR_FP64 |
CL_KHR_INT64_BASE_ATOMICS |
CL_KHR_INT64_EXTENDED_ATOMICS |
CL_KHR_GL_SHARING |

Definition at line 29 of file aclTypes.h.

## Extension [2/2]

enum acl::Extension

Enumerator
CL_KHR_FP64 |
CL_KHR_INT64_BASE_ATOMICS |
CL_KHR_INT64_EXTENDED_ATOMICS |
CL_KHR_GL_SHARING |
CL_KHR_FP64 |
CL_KHR_INT64_BASE_ATOMICS |
CL_KHR_INT64_EXTENDED_ATOMICS |
CL_KHR_GL_SHARING |

Definition at line 29 of file aclTypes.h.

## ReductionOperatorType [1/2]

enum acl::ReductionOperatorType

Enumerator
ROT_SUM |
ROT_PRODUCT |
ROT_MINIMUM |
ROT_MAXIMUM |
ROT_SUM |
ROT_PRODUCT |
ROT_MINIMUM |
ROT_MAXIMUM |

Definition at line 35 of file aclReductionAlgGenerator.h.

## ReductionOperatorType [2/2]

enum acl::ReductionOperatorType

Enumerator
ROT_SUM |
ROT_PRODUCT |
ROT_MINIMUM |
ROT_MAXIMUM |
ROT_SUM |
ROT_PRODUCT |
ROT_MINIMUM |
ROT_MAXIMUM |

Definition at line 35 of file aclReductionAlgGenerator.h.

## TypeID [1/2]

enum acl::TypeID

Enumerator
TYPE_INT |
TYPE_UINT |
TYPE_FLOAT |
TYPE_DOUBLE |
TYPE_LONG |
TYPE_INT |
TYPE_UINT |
TYPE_FLOAT |
TYPE_DOUBLE |
TYPE_LONG |

Definition at line 38 of file aclTypes.h.

## TypeID [2/2]

enum acl::TypeID

Enumerator
TYPE_INT |
TYPE_UINT |
TYPE_FLOAT |
TYPE_DOUBLE |
TYPE_LONG |
TYPE_INT |
TYPE_UINT |
TYPE_FLOAT |
TYPE_DOUBLE |
TYPE_LONG |

Definition at line 38 of file aclTypes.h.

## Function Documentation

## addElementToKernelSource()

void acl::addElementToKernelSource | ( | Element | e,
|  | std::vector< Element > & | arguments,
|  | std::vector< Element > & | localDeclarations
| ) |  |

adds `e` either to `arguments` or to `localDeclarations`

## compatible() [1/3]

bool acl::compatible | ( | Element | e1,
|  | Element | e2
| ) |  |

## compatible() [2/3]

bool acl::compatible | ( | unsigned int | size,
|  | CommandQueue | queue,
|  | Element | e
| ) |  |

## compatible() [3/3]

bool acl::compatible | ( | unsigned int | size1,
|  | CommandQueue | queue1,
|  | unsigned int | size2,
|  | CommandQueue | queue2
| ) |  |

determines whether two elements are compatible i.e. have compatible sizes and reside on the same device

## compatibleSizes() [1/4]

bool acl::compatibleSizes | ( | Element | e1,
|  | Element | e2
| ) |  |

if both elements have the same size or size of at least one of them is 0

## compatibleSizes() [2/4]

bool acl::compatibleSizes | ( | unsigned int | s,
|  | const VectorOfElements & | a
| ) |  |

inline

Definition at line 118 of file aclVectorOfElementsDef.h.

## compatibleSizes() [3/4]

bool acl::compatibleSizes | ( | unsigned int | s,
|  | Element | e
| ) |  |

if `s` and size of `e` are the same or at least one of them is 0

## compatibleSizes() [4/4]

bool acl::compatibleSizes | ( | unsigned int | s1,
|  | unsigned int | s2
| ) |  |

inline

if `s` and size of `e` are the same or at least one of them is 0

Definition at line 90 of file aclUtilities.h.

## copy() [1/11]

void acl::copy | ( | const vector< Element > & | source,
|  | VectorOfElements & | destination
| ) |  |

related

## copy() [2/11]

void acl::copy | ( | const VectorOfElementsData & | source,
|  | VectorOfElementsData & | destination
| ) |  |

related

## copy() [3/11]

template<typename T >

void acl::copy | ( | Element | source,
|  | std::vector< T > & | destination
| ) |  |

Copies source to destination, resizes destination to accommodate source.

## copy() [4/11]

template<typename T >

void acl::copy | ( | Element | source,
|  | T * | destination
| ) |  |

Copies source to destination.

## copy() [5/11]

template<typename T >

void acl::copy | ( | MemBlock & | source,
|  | MemBlock & | destination
| ) |  |

Copies source to destination, exit(1) if sizes do not match.

## copy() [6/11]

template<typename T >

void acl::copy | ( | MemBlock & | source,
|  | std::vector< T > & | destination
| ) |  |

Copies source to destination, resizes destination to accommodate source.

## copy() [7/11]

template<typename T >

void acl::copy | ( | MemBlock & | source,
|  | T * | destination
| ) |  |

Copies source to destination, resizes destination to accommodate source.

Examples
  testASLData.cc, testKernel.cc, testMatrixOfElements.cc, testOperators.cc, and testVectorOfElements.cc.

## copy() [8/11]

template<typename T >

void acl::copy | ( | std::vector< T > & | source,
|  | Element | destination
| ) |  |

Copies source to destination, exit(1) if sizes do not match.

## copy() [9/11]

template<typename T >

void acl::copy | ( | std::vector< T > & | source,
|  | MemBlock & | destination
| ) |  |

Copies source to destination, exit(1) if sizes do not match.

## copy() [10/11]

template<typename T >

void acl::copy | ( | T * | source,
|  | Element | destination
| ) |  |

Copies source to destination.

## copy() [11/11]

template<typename T >

void acl::copy | ( | T * | source,
|  | MemBlock & | destination
| ) |  |

Copies source to destination, exit(1) if sizes do not match.

## createKernels()

void acl::createKernels | ( | std::vector< SPKernel > & | vk,
|  | unsigned int | n,
|  | const KernelConfiguration & | kernelConfig_
| ) |  |

related

Definition at line 100 of file aclKernel.h.

## differentSign()

VectorOfElements acl::differentSign | ( | VectorOfElements | v | ) |

generate expresion returning true if elements of v have different signs or one of them zerow

## findNearestDirectionCode() [1/2]

void acl::findNearestDirectionCode | ( | const vector< asl::AVec<>> & | directions,
|  | VectorOfElements | v,
|  | VectorOfElements | iDir,
|  | ExpressionContainer & | k
| ) |  |

generates code for finding nearest direction from given directions set `directions`

Parameters

  directions | vectors set defining directions
  v | the vector for which directions is seeked
  iDir | the number of vector is stored here
  k | the kernel for the generated code

## findNearestDirectionCode() [2/2]

void acl::findNearestDirectionCode | ( | const vector< asl::AVec<>> & | directions,
|  | VectorOfElements | v,
|  | VectorOfElements | iDir,
|  | VectorOfElements | scalProduct,
|  | ExpressionContainer & | k
| ) |  |

generates code for finding nearest direction from given directions set `directions`

Parameters

  directions | vector set defining directions the directions are normalized internaly
  v | the vector for which directions is seeked
  iDir | the number of vector is stored here
  scalProd | the scalar product of the vector with the corresponding normalized direction vector is stored here
  k | the kernel for the generated code

## gcLength()

vector< Element > acl::gcLength | ( | const VectorOfElements & | a,
|  | const VectorOfElements & | l
| ) |  |

generates code corresponding \( |\vec a| \). Result will be stored in `l`

## gcLength2()

vector< Element > acl::gcLength2 | ( | const VectorOfElements & | a,
|  | const VectorOfElements & | l2
| ) |  |

generates code corresponding \( |\vec a|^2 \). Result will be stored in `l2`

## gcNormalize()

vector< Element > acl::gcNormalize | ( | const VectorOfElements & | a | ) |

generates code corresponding \( \vec a /= |\vec a|\)

## generateElementArray() [1/2]

ElementData acl::generateElementArray | ( | TypeID | typeID,
|  | unsigned int | size
| ) |  |

## generateElementArray() [2/2]

ElementData acl::generateElementArray | ( | TypeID | typeID,
|  | unsigned int | size,
|  | CommandQueue | queue_
| ) |  |

## generateElementLocalArray()

Element acl::generateElementLocalArray | ( | TypeID | typeID,
|  | unsigned int | size
| ) |  |

## generateMaxAlg()

template<typename ResType >

std::shared_ptr< ReductionAlgGenerator< ResType, ROT_MAXIMUM > > acl::generateMaxAlg | ( | VectorOfElements | v | ) |

## generateMinAlg()

template<typename ResType >

std::shared_ptr< ReductionAlgGenerator< ResType, ROT_MINIMUM > > acl::generateMinAlg | ( | VectorOfElements | v | ) |

## generateParsedVE()

VectorOfElements acl::generateParsedVE | ( | const VectorOfElements & | fields,
|  | const vector< string > & | names,
|  | const string & | statement
| ) |  |

## generateProductAlg()

template<typename ResType >

std::shared_ptr< ReductionAlgGenerator< ResType, ROT_PRODUCT > > acl::generateProductAlg | ( | VectorOfElements | v | ) |

## generateShiftedElement() [1/3]

Element acl::generateShiftedElement | ( | Element | ,
|  | Element | offset
| ) |  |

## generateShiftedElement() [2/3]

Element acl::generateShiftedElement | ( | Element | ,
|  | int * | offset
| ) |  |

## generateShiftedElement() [3/3]

Element acl::generateShiftedElement | ( | Element | ,
|  | int | offset
| ) |  |

## generateSubElement() [1/3]

Element acl::generateSubElement | ( | Element | ,
|  | unsigned int | size,
|  | Element | offset
| ) |  |

## generateSubElement() [2/3]

Element acl::generateSubElement | ( | Element | ,
|  | unsigned int | size,
|  | int * | offset
| ) |  |

function creates subElement with given length and offset; offset can be a variable

## generateSubElement() [3/3]

Element acl::generateSubElement | ( | Element | ,
|  | unsigned int | size,
|  | int | offset
| ) |  |

function creates subElement with given length and offset; offset is constant

## generateSumAlg()

template<typename ResType >

std::shared_ptr< ReductionAlgGenerator< ResType, ROT_SUM > > acl::generateSumAlg | ( | VectorOfElements | v | ) |

## generateVEOutOfBoundarySafe() [1/2]

VectorOfElements acl::generateVEOutOfBoundarySafe | ( | const VectorOfElements & | a | ) |

generates Vector of elements wraping the `a` in order to avoid out of boundary acces

## generateVEOutOfBoundarySafe() [2/2]

VectorOfElements acl::generateVEOutOfBoundarySafe | ( | const VectorOfElements & | a,
|  | const VectorOfElements & | outVal
| ) |  |

generates Vector of elements wraping the `a` in order to avoid out of boundary acces with given out of boundary value

## getContext()

cl::Context acl::getContext | ( | const CommandQueue & | queue | ) |

## getDevice()

cl::Device acl::getDevice | ( | const CommandQueue & | queue | ) |

## getDeviceVersion()

std::string acl::getDeviceVersion | ( | const CommandQueue & | queue | ) |

Returns the OpenCL version supported by the device

## getDriverVersion()

std::string acl::getDriverVersion | ( | const CommandQueue & | queue | ) |

Returns the OpenCL driver version

## indexDependedConstant()

template<typename T >

VectorOfElements acl::indexDependedConstant | ( | vector< unsigned int > | r,
|  | vector< T > | values
| ) |  |

## isArgument()

bool acl::isArgument | ( | Element | e | ) |

## isConstant()

bool acl::isConstant | ( | Element | e | ) |

## isDeclarable()

bool acl::isDeclarable | ( | Element | e | ) |

## isMemBlock()

bool acl::isMemBlock | ( | Element | e | ) |

## isSingleValue()

bool acl::isSingleValue | ( | Element | e | ) |

The function returns true when the input is a single valued object e.g. aclConstatnt, aclVariable.

## l2()

VectorOfElements acl::l2 | ( | const VectorOfElements & | a | ) |

related

Definition at line 751 of file aclVectorOfElementsOperations.h.

## map()

template<typename T >

std::shared_ptr< T > acl::map | ( | ElementData | m | ) |

inline

Examples
  cubeGravity.cc, cubeIncompressibleGravity.cc, and cubePoroelasticGravity.cc.

Definition at line 68 of file aclMemBlock.h.

## normalize()

QuaternionOfElements acl::normalize | ( | QuaternionOfElements & | a | ) |

## onSameDevice() [1/3]

bool acl::onSameDevice | ( | CommandQueue | queue,
|  | Element | e
| ) |  |

## onSameDevice() [2/3]

bool acl::onSameDevice | ( | CommandQueue | queue1,
|  | CommandQueue | queue2
| ) |  |

checks whether both elements reside on the same device

## onSameDevice() [3/3]

bool acl::onSameDevice | ( | Element | e1,
|  | Element | e2
| ) |  |

## paddingBytes()

unsigned int acl::paddingBytes | ( | unsigned int | size,
|  | unsigned int | typeSize,
|  | CommandQueue | queue
| ) |  |

Adds padding in bytes based on the device's alignment.

## paddingElements()

unsigned int acl::paddingElements | ( | unsigned int | size,
|  | const KernelConfiguration & | kernelConfig
| ) |  |

Adds padding in elements based on vector width.

## swapBuffers() [1/2]

void acl::swapBuffers | ( | MemBlock & | a,
|  | MemBlock & | b
| ) |  |

inline

Definition at line 62 of file aclMemBlock.h.

## swapBuffers() [2/2]

template<typename T >

void acl::swapBuffers | ( | std::shared_ptr< Array< T > > | a,
|  | std::shared_ptr< Array< T > > | b
| ) |  |

Examples
  testKernel.cc.

## typeToStr() [1/2]

template<typename T >

const std::string & acl::typeToStr | ( |  | ) |

## typeToStr() [2/2]

template<typename T >

const std::string acl::typeToStr | ( | unsigned int | i | ) |

inline

Definition at line 120 of file aclUtilities.h.

## typeToTypeID()

template<typename T >

constexpr const TypeID acl::typeToTypeID | ( |  | ) |

inline constexpr

## typeToTypeID< cl_double >()

template<>

constexpr const TypeID acl::typeToTypeID< cl_double > | ( |  | ) |

inline constexpr

Definition at line 95 of file aclUtilities.h.

## typeToTypeID< cl_float >()

template<>

constexpr const TypeID acl::typeToTypeID< cl_float > | ( |  | ) |

inline constexpr

Definition at line 100 of file aclUtilities.h.

## typeToTypeID< cl_int >()

template<>

constexpr const TypeID acl::typeToTypeID< cl_int > | ( |  | ) |

inline constexpr

Definition at line 105 of file aclUtilities.h.

## typeToTypeID< cl_long >()

template<>

constexpr const TypeID acl::typeToTypeID< cl_long > | ( |  | ) |

inline constexpr

Definition at line 115 of file aclUtilities.h.

## typeToTypeID< cl_uint >()

template<>

constexpr const TypeID acl::typeToTypeID< cl_uint > | ( |  | ) |

inline constexpr

Definition at line 110 of file aclUtilities.h.

## Variable Documentation

## hardware

Hardware acl::hardware

extern

Definition at line 163 of file aclHardware.h.

## INDEX

const std::string acl::INDEX

extern

Definition at line 39 of file aclUtilities.h.

## TYPE

const std::vector< std::string > acl::TYPE

extern

Definition at line 42 of file aclHardware.h.

## TYPE_SELECT

const std::vector< TypeID > acl::TYPE_SELECT

extern

contains trasnlation of types necessery for use in the function select

Examples
  testKernel.cc.

Definition at line 46 of file aclHardware.h.

## TYPE_SIZE

const std::vector< unsigned char > acl::TYPE_SIZE

extern

Definition at line 43 of file aclHardware.h.