# The "va" Package

These routines are meant to provide a suite of arithmetic operations on vectors (arrays) of data. These routines are highly optimised, with many inner loops coded in assembler to achieve sustained performance approaching (and in some cases equalling) the rated peak performance of the hardware. On some platforms, a speed improvment of over 30 times has been attained by coding in assembler.

Library: karma
Link With: -lkarma

#### Functions

va_scale_float | Scale and offset an array of floats.

## Functions

void va_scale_float (float *out, int out_stride, float *inp, int inp_stride, int length, float scale, float offset)

This routine will perform a scale and offset operation on an array of floating point numbers. The arithmetic form is as follows: out[i] = inp[i] * scale + offset

Parameters:

- out : The result array will be written here.
- out_stride : The stride (in floats) of consecutive elements in the output array.
- inp : The input array.
- inp_stride : The stride (in floats) of consecutive elements in the input array.
- length : The length of the input and output arrays.
- scale : The scale factor.
- offset : The offset value.

Returns: Nothing.
Multithreading Level: Unsafe
Note:

- The elements of the input and output arrays must be aligned on a float boundary.

Back to Karma Home Page