VecLib is a large set of routines offering high-performance, optimised implementations of vector elementwise functions.

The library contains 4576 functions of 2, 3, or 4 operands, real or complex, scalar or vector.The functions have the following forms:

r[i] = a[i] op1 b[i], i = 1, ..., N r[i] = a[i] op1 (b[i] op2 c[i]), i = 1, ..., N r[i] = (a[i] op1 b[i]) op2 c[i], i = 1, ..., N r[i] = (a[i] op1 b[i]) op2 (c[i] op3 d[i]), i = 1, ..., N where- each of op1, op2 and op3 can be +, -, × or ÷
- each of a, b, c and d can be real or complex, scalar or vector
- the vectors can be strided independently.

## Library Contents

Functions of 2 operands:- Contains all possible combinations of real, complex, scalar or vector arguments.
- A total of 110 independent functions, 128 functions in all.

Real functions of 3 operands:

- Contains all possible combinations of real scalar or real vector arguments.
- A total of 149 independent functions, 336 functions in all.

Complex functions of 3 operands:

- Contains all possible combinations of complex scalar and complex vector arguments.
- A total of 1263 independent functions, 3024 functions in all.

Real vector functions of 4 operands:

- Contains all possible combinations of real vector arguments.
- A total of 62 independent functions, 64 functions in all.

Complex vector functions of 4 operands:

- Contains all possible combinations of complex vector arguments.
- A total of 805 independent functions, 1024 functions in all.

## Naming Convention

VecLib is a large library, but using it is simplified by the systematic naming convention. Function names are made up from the components describing the function:- brackets ( and ) are denoted
**b** - operations +, -, × and ÷ are denoted
**p**,**m**,**t**and**d**, respectively - real vector or matrix operands are denoted
**r** - complex vector or matrix operands are denoted
**c** - conjugated complex vector or matrix operands are denoted
**j** - real scalar operands are denoted
**R** - complex scalar operands are denoted
**C** - conjugated complex scalars are denoted
**J** - functions for vectors start
**v** - functions for matrices start
**m** - transposed matrix inputs are denoted
**T** - transposed and conjugated matrix inputs are denoted
**H** - operands marked for cache removal have
**l**appended to them.

Here are a few examples of function names: r, a, b, c are vectors, ß (beta) is a scalar.

Function Name | Action | Comment |
---|---|---|

vrpbrmrb | r[i] = a[i] * (b[i] - c[i]) | all parameters real |

vcpbjmjb | r[i] = a[i] + (b[i]' - c[i]') | all parameters complex |

vcpbrtJb | r[i] = a[i] + (b[i] * ß') | r, a and beta are complex, b is real |

You can examine the entire list of __VecLib functions__. If the elementwise functions you want are not in our standard library we can provide them.

## Implementations

**MI****PS 64bit****ARM****PPC****T2080****PPC****T4240****Intel AVX512****Intel Phi****Intel AVX2****Intel AVX****Intel SSE****MIPS****G4**(PowerPC-Altivec)