Liboil Reference Manual | ||||
---|---|---|---|---|
Top | Description |
void oil_abs_f32_f32 (float *dest, int dstr, const float *src, int sstr, int n); void oil_abs_f64_f64 (double *dest, int dstr, const double *src, int sstr, int n); void oil_abs_u16_s16 (uint16_t *dest, int dstr, const int16_t *src, int sstr, int n); void oil_abs_u32_s32 (uint32_t *dest, int dstr, const int32_t *src, int sstr, int n); void oil_abs_u8_s8 (uint8_t *dest, int dstr, const int8_t *src, int sstr, int n); void oil_average2_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr1, const uint8_t *s2, int sstr2, int n); void oil_multsum_f32 (float *dest, const float *src1, int sstr1, const float *src2, int sstr2, int n); void oil_multsum_f64 (double *dest, const double *src1, int sstr1, const double *src2, int sstr2, int n); void oil_scalaradd_f32 (float *d, int dstr, const float *s1, int sstr, const float *s2_1, int n); void oil_scalaradd_f64 (double *d, int dstr, const double *s1, int sstr, const double *s2_1, int n); void oil_scalaradd_s16 (int16_t *d, int dstr, const int16_t *s1, int sstr, const int16_t *s2_1, int n); void oil_scalaradd_s32 (int32_t *d, int dstr, const int32_t *s1, int sstr, const int32_t *s2_1, int n); void oil_scalaradd_s8 (int8_t *d, int dstr, const int8_t *s1, int sstr, const int8_t *s2_1, int n); void oil_scalaradd_u16 (uint16_t *d, int dstr, const uint16_t *s1, int sstr, const uint16_t *s2_1, int n); void oil_scalaradd_u32 (uint32_t *d, int dstr, const uint32_t *s1, int sstr, const uint32_t *s2_1, int n); void oil_scalaradd_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr, const uint8_t *s2_1, int n); void oil_scalarmult_f32 (float *d, int dstr, const float *s1, int sstr, const float *s2_1, int n); void oil_scalarmult_f64 (double *d, int dstr, const double *s1, int sstr, const double *s2_1, int n); void oil_scalarmult_s16 (int16_t *d, int dstr, const int16_t *s1, int sstr, const int16_t *s2_1, int n); void oil_scalarmult_s32 (int32_t *d, int dstr, const int32_t *s1, int sstr, const int32_t *s2_1, int n); void oil_scalarmult_s8 (int8_t *d, int dstr, const int8_t *s1, int sstr, const int8_t *s2_1, int n); void oil_scalarmult_u16 (uint16_t *d, int dstr, const uint16_t *s1, int sstr, const uint16_t *s2_1, int n); void oil_scalarmult_u32 (uint32_t *d, int dstr, const uint32_t *s1, int sstr, const uint32_t *s2_1, int n); void oil_scalarmult_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr, const uint8_t *s2_1, int n); void oil_vectoradd_f32 (float *d, int dstr, const float *s1, int sstr1, const float *s2, int sstr2, int n, const float *s3_1, const float *s4_1); void oil_vectoradd_f64 (double *d, int dstr, const double *s1, int sstr1, const double *s2, int sstr2, int n, const double *s3_1, const double *s4_1); void oil_vectoradd_s16 (int16_t *d, int dstr, const int16_t *s1, int sstr1, const int16_t *s2, int sstr2, int n, const int16_t *s3_1, const int16_t *s4_1); void oil_vectoradd_s32 (int32_t *d, int dstr, const int32_t *s1, int sstr1, const int32_t *s2, int sstr2, int n, const int32_t *s3_1, const int32_t *s4_1); void oil_vectoradd_s8 (int8_t *d, int dstr, const int8_t *s1, int sstr1, const int8_t *s2, int sstr2, int n, const int8_t *s3_1, const int8_t *s4_1); void oil_vectoradd_u16 (uint16_t *d, int dstr, const uint16_t *s1, int sstr1, const uint16_t *s2, int sstr2, int n, const uint16_t *s3_1, const uint16_t *s4_1); void oil_vectoradd_u32 (uint32_t *d, int dstr, const uint32_t *s1, int sstr1, const uint32_t *s2, int sstr2, int n, const uint32_t *s3_1, const uint32_t *s4_1); void oil_vectoradd_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr1, const uint8_t *s2, int sstr2, int n, const uint8_t *s3_1, const uint8_t *s4_1); void oil_vectoradd_s_s8 (int8_t *d, int dstr, const int8_t *s1, int sstr1, const int8_t *s2, int sstr2, int n); void oil_vectoradd_s_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr1, const uint8_t *s2, int sstr2, int n); void oil_vectoradd_s_s16 (int16_t *d, int dstr, const int16_t *s1, int sstr1, const int16_t *s2, int sstr2, int n); void oil_vectoradd_s_u16 (uint16_t *d, int dstr, const uint16_t *s1, int sstr1, const uint16_t *s2, int sstr2, int n); void oil_vectoradd_s_f32 (float *d, int dstr, const float *s1, int sstr1, const float *s2, int sstr2, int n); void oil_vectoradd_s_f64 (double *d, int dstr, const double *s1, int sstr1, const double *s2, int sstr2, int n); void oil_squaresum_f64 (double *d, const double *s, int n); void oil_squaresum_shifted_s16 (uint32_t *d, const int16_t *s, int n); void oil_sum_f64 (double *d_1, const double *s, int sstr, int n); void oil_add_f32 (float *d, const float *s1, const float *s2, int n); void oil_divide_f32 (float *d, const float *s1, const float *s2, int n); void oil_floor_f32 (float *d, const float *s, int n); void oil_inverse_f32 (float *d, const float *s, int n); void oil_maximum_f32 (float *d, const float *s1, const float *s2, int n); void oil_minimum_f32 (float *d, const float *s1, const float *s2, int n); void oil_multiply_f32 (float *d, const float *s1, const float *s2, int n); void oil_negative_f32 (float *d, const float *s, int n); void oil_scalaradd_f32_ns (float *d, const float *s1, const float *s2_1, int n); void oil_scalarmultiply_f32_ns (float *d, const float *s1, const float *s2_1, int n); void oil_sign_f32 (float *d, const float *s, int n); void oil_subtract_f32 (float *d, const float *s1, const float *s2, int n);
void oil_abs_f32_f32 (float *dest, int dstr, const float *src, int sstr, int n);
Calculates the absolute value of each element in the source array and writes it into the destination array.
|
destination array |
|
stride of destination elements |
|
source array |
|
stride of source elements |
|
number of elements in arrays |
void oil_abs_f64_f64 (double *dest, int dstr, const double *src, int sstr, int n);
Calculates the absolute value of each element in the source array and writes it into the destination array.
|
destination array |
|
stride of destination elements |
|
source array |
|
stride of source elements |
|
number of elements in arrays |
void oil_abs_u16_s16 (uint16_t *dest, int dstr, const int16_t *src, int sstr, int n);
Calculates the absolute value of each element in the source array and writes it into the destination array.
|
destination array |
|
stride of destination elements |
|
source array |
|
stride of source elements |
|
number of elements in arrays |
void oil_abs_u32_s32 (uint32_t *dest, int dstr, const int32_t *src, int sstr, int n);
Calculates the absolute value of each element in the source array and writes it into the destination array.
|
destination array |
|
stride of destination elements |
|
source array |
|
stride of source elements |
|
number of elements in arrays |
void oil_abs_u8_s8 (uint8_t *dest, int dstr, const int8_t *src, int sstr, int n);
Calculates the absolute value of each element in the source array and writes it into the destination array.
|
destination array |
|
stride of destination elements |
|
source array |
|
stride of source elements |
|
number of elements in arrays |
void oil_average2_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr1, const uint8_t *s2, int sstr2, int n);
Averages each element in s1
and s2
and places the result in d
.
FIXME: This class is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
void oil_multsum_f32 (float *dest, const float *src1, int sstr1, const float *src2, int sstr2, int n);
Multiplies each element in src1
and src2
and sums the results
over the entire array, and places the sum into dest
.
|
|
|
|
|
|
|
|
|
|
|
void oil_multsum_f64 (double *dest, const double *src1, int sstr1, const double *src2, int sstr2, int n);
Multiplies each element in src1
and src2
and sums the results
over the entire array, and places the sum into dest
.
|
|
|
|
|
|
|
|
|
|
|
void oil_scalaradd_f32 (float *d, int dstr, const float *s1, int sstr, const float *s2_1, int n);
Adds the constant value s2_1
to each value in s1
and places the
result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
void oil_scalaradd_f64 (double *d, int dstr, const double *s1, int sstr, const double *s2_1, int n);
Adds the constant value s2_1
to each value in s1
and places the
result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
void oil_scalaradd_s16 (int16_t *d, int dstr, const int16_t *s1, int sstr, const int16_t *s2_1, int n);
Adds the constant value s2_1
to each value in s1
and places the
result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
void oil_scalaradd_s32 (int32_t *d, int dstr, const int32_t *s1, int sstr, const int32_t *s2_1, int n);
Adds the constant value s2_1
to each value in s1
and places the
result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
void oil_scalaradd_s8 (int8_t *d, int dstr, const int8_t *s1, int sstr, const int8_t *s2_1, int n);
Adds the constant value s2_1
to each value in s1
and places the
result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
void oil_scalaradd_u16 (uint16_t *d, int dstr, const uint16_t *s1, int sstr, const uint16_t *s2_1, int n);
Adds the constant value s2_1
to each value in s1
and places the
result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
void oil_scalaradd_u32 (uint32_t *d, int dstr, const uint32_t *s1, int sstr, const uint32_t *s2_1, int n);
Adds the constant value s2_1
to each value in s1
and places the
result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
void oil_scalaradd_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr, const uint8_t *s2_1, int n);
Adds the constant value s2_1
to each value in s1
and places the
result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
void oil_scalarmult_f32 (float *d, int dstr, const float *s1, int sstr, const float *s2_1, int n);
Multiplies the constant value s2_1
to each value in s1
and places the
result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
void oil_scalarmult_f64 (double *d, int dstr, const double *s1, int sstr, const double *s2_1, int n);
Multiplies the constant value s2_1
to each value in s1
and places the
result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
void oil_scalarmult_s16 (int16_t *d, int dstr, const int16_t *s1, int sstr, const int16_t *s2_1, int n);
Multiplies the constant value s2_1
to each value in s1
and places the
result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
void oil_scalarmult_s32 (int32_t *d, int dstr, const int32_t *s1, int sstr, const int32_t *s2_1, int n);
Multiplies the constant value s2_1
to each value in s1
and places the
result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
void oil_scalarmult_s8 (int8_t *d, int dstr, const int8_t *s1, int sstr, const int8_t *s2_1, int n);
Multiplies the constant value s2_1
to each value in s1
and places the
result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
void oil_scalarmult_u16 (uint16_t *d, int dstr, const uint16_t *s1, int sstr, const uint16_t *s2_1, int n);
Multiplies the constant value s2_1
to each value in s1
and places the
result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
void oil_scalarmult_u32 (uint32_t *d, int dstr, const uint32_t *s1, int sstr, const uint32_t *s2_1, int n);
Multiplies the constant value s2_1
to each value in s1
and places the
result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
void oil_scalarmult_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr, const uint8_t *s2_1, int n);
Multiplies the constant value s2_1
to each value in s1
and places the
result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
void oil_vectoradd_f32 (float *d, int dstr, const float *s1, int sstr1, const float *s2, int sstr2, int n, const float *s3_1, const float *s4_1);
Multiplies the constant s3_1
with each element of s1
and
multiplies the constant s4_1
with each element of s2
and
adds the two results together and places the final result in
d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void oil_vectoradd_f64 (double *d, int dstr, const double *s1, int sstr1, const double *s2, int sstr2, int n, const double *s3_1, const double *s4_1);
Multiplies the constant s3_1
with each element of s1
and
multiplies the constant s4_1
with each element of s2
and
adds the two results together and places the final result in
d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void oil_vectoradd_s16 (int16_t *d, int dstr, const int16_t *s1, int sstr1, const int16_t *s2, int sstr2, int n, const int16_t *s3_1, const int16_t *s4_1);
Multiplies the constant s3_1
with each element of s1
and
multiplies the constant s4_1
with each element of s2
and
adds the two results together and places the final result in
d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void oil_vectoradd_s32 (int32_t *d, int dstr, const int32_t *s1, int sstr1, const int32_t *s2, int sstr2, int n, const int32_t *s3_1, const int32_t *s4_1);
Multiplies the constant s3_1
with each element of s1
and
multiplies the constant s4_1
with each element of s2
and
adds the two results together and places the final result in
d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void oil_vectoradd_s8 (int8_t *d, int dstr, const int8_t *s1, int sstr1, const int8_t *s2, int sstr2, int n, const int8_t *s3_1, const int8_t *s4_1);
Multiplies the constant s3_1
with each element of s1
and
multiplies the constant s4_1
with each element of s2
and
adds the two results together and places the final result in
d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void oil_vectoradd_u16 (uint16_t *d, int dstr, const uint16_t *s1, int sstr1, const uint16_t *s2, int sstr2, int n, const uint16_t *s3_1, const uint16_t *s4_1);
Multiplies the constant s3_1
with each element of s1
and
multiplies the constant s4_1
with each element of s2
and
adds the two results together and places the final result in
d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void oil_vectoradd_u32 (uint32_t *d, int dstr, const uint32_t *s1, int sstr1, const uint32_t *s2, int sstr2, int n, const uint32_t *s3_1, const uint32_t *s4_1);
Multiplies the constant s3_1
with each element of s1
and
multiplies the constant s4_1
with each element of s2
and
adds the two results together and places the final result in
d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void oil_vectoradd_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr1, const uint8_t *s2, int sstr2, int n, const uint8_t *s3_1, const uint8_t *s4_1);
Multiplies the constant s3_1
with each element of s1
and
multiplies the constant s4_1
with each element of s2
and
adds the two results together and places the final result in
d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void oil_vectoradd_s_s8 (int8_t *d, int dstr, const int8_t *s1, int sstr1, const int8_t *s2, int sstr2, int n);
Adds each element of s1
to s2
and clamps the result to the range
of the type and places the result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
void oil_vectoradd_s_u8 (uint8_t *d, int dstr, const uint8_t *s1, int sstr1, const uint8_t *s2, int sstr2, int n);
Adds each element of s1
to s2
and clamps the result to the range
of the type and places the result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
void oil_vectoradd_s_s16 (int16_t *d, int dstr, const int16_t *s1, int sstr1, const int16_t *s2, int sstr2, int n);
Adds each element of s1
to s2
and clamps the result to the range
of the type and places the result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
void oil_vectoradd_s_u16 (uint16_t *d, int dstr, const uint16_t *s1, int sstr1, const uint16_t *s2, int sstr2, int n);
Adds each element of s1
to s2
and clamps the result to the range
of the type and places the result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
void oil_vectoradd_s_f32 (float *d, int dstr, const float *s1, int sstr1, const float *s2, int sstr2, int n);
Adds each element of s1
to s2
and clamps the result to the range
[-1,1] and places the result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
void oil_vectoradd_s_f64 (double *d, int dstr, const double *s1, int sstr1, const double *s2, int sstr2, int n);
Adds each element of s1
to s2
and clamps the result to the range
[-1,1] and places the result in d
.
FIXME: This function is difficult to optimize and will likely be replaced.
|
|
|
|
|
|
|
|
|
|
|
|
|
void oil_squaresum_f64 (double *d, const double *s, int n);
Sums the square of each element in s
and places the result in
dest
.
|
|
|
|
|
void oil_squaresum_shifted_s16 (uint32_t *d, const int16_t *s, int n);
Square each element in s
and divide by (1<<15), and sum the
results, placing the final result in d
.
|
|
|
|
|
void oil_sum_f64 (double *d_1, const double *s, int sstr, int n);
Sums the elements in the source array and places the result in
d
.
|
destination |
|
source array |
|
stride of source elements |
|
number of elements |
void oil_add_f32 (float *d, const float *s1, const float *s2, int n);
Adds elements in s2
and s1
and places the result in d
.
|
destination |
|
source 1 |
|
source 2 |
|
number of elements |
void oil_divide_f32 (float *d, const float *s1, const float *s2, int n);
Divides elements in s1
by s2
and places the result in d
.
|
destination |
|
source 1 |
|
source 2 |
|
number of elements |
void oil_floor_f32 (float *d, const float *s, int n);
Calculates the greatest integer less than or equal to each element
in s
and places the result in d
.
|
destination |
|
source |
|
number of elements |
void oil_inverse_f32 (float *d, const float *s, int n);
Calculates the multiplicative inverse of each element in s
and
places the result in d
.
|
destination |
|
source |
|
number of elements |
void oil_maximum_f32 (float *d, const float *s1, const float *s2, int n);
Places the greater of s1
and s2
in d
.
|
destination |
|
source 1 |
|
source 2 |
|
number of elements |
void oil_minimum_f32 (float *d, const float *s1, const float *s2, int n);
Places the lesser of s1
and s2
in d
.
|
destination |
|
source 1 |
|
source 2 |
|
number of elements |
void oil_multiply_f32 (float *d, const float *s1, const float *s2, int n);
Multiplies elements in s1
and s2
and places the result in d
.
|
destination |
|
source 1 |
|
source 2 |
|
number of elements |
void oil_negative_f32 (float *d, const float *s, int n);
Negates each element in s
and places the result in d
.
|
destination |
|
source |
|
number of elements |
void oil_scalaradd_f32_ns (float *d, const float *s1, const float *s2_1, int n);
Adds the constant value s2_1
to each source element and places
the result in d
.
|
destination |
|
source |
|
source |
|
number of elements |
void oil_scalarmultiply_f32_ns (float *d, const float *s1, const float *s2_1, int n);
Multiplies the constant value s2_1
and each source element and places
the result in d
.
|
destination |
|
source |
|
source |
|
number of elements |
void oil_sign_f32 (float *d, const float *s, int n);
Calculates the sign of each element in s
and
places the result in d
.
|
destination |
|
source |
|
number of elements |