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.
Link With: -lkarma
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
- out :
The result array will be written here.
- out_stride :
The stride (in floats) of consecutive elements in the output
- inp :
The input array.
- inp_stride :
The stride (in floats) of consecutive elements in the input
- length :
The length of the input and output arrays.
- scale :
The scale factor.
- offset :
The offset value.
Multithreading Level: Unsafe
- The elements of the input and output arrays must be aligned on a
Back to Karma Home Page
Contact: Richard Gooch
Web Development: Ariel Internet Services