6 #include "xs3_math_conf.h"
7 #include "xs3_math_types.h"
32 #define XS3_VECT_SQRT_S16_MAX_DEPTH (15)
69 const unsigned length);
102 const unsigned length);
159 const unsigned length,
176 #define xs3_vect_s16_add_prepare xs3_vect_s32_add_prepare
237 const unsigned length,
253 #define xs3_vect_s16_add_scalar_prepare xs3_vect_s32_add_prepare
281 const unsigned length);
309 const unsigned length);
362 const unsigned length,
363 const int16_t lower_bound,
364 const int16_t upper_bound,
407 int16_t* lower_bound,
408 int16_t* upper_bound,
460 const unsigned length);
515 const unsigned length,
554 const unsigned length);
596 const unsigned length,
597 const unsigned scale);
640 const unsigned length);
673 const unsigned length);
732 const unsigned length,
767 const unsigned length);
826 const unsigned length,
894 const unsigned length,
963 const unsigned length,
1069 #define xs3_vect_s16_nmacc_prepare xs3_vect_s16_macc_prepare
1116 const unsigned length,
1236 const unsigned length);
1284 const unsigned length,
1395 const unsigned length);
1436 const unsigned length,
1478 const unsigned length,
1540 const unsigned length,
1542 const unsigned depth);
1661 const unsigned length,
1678 #define xs3_vect_s16_sub_prepare xs3_vect_s32_add_prepare
1711 const unsigned length);
int exponent_t
An exponent.
Definition: xs3_math_types.h:76
int left_shift_t
A leftwards arithmetic bit-shift.
Definition: xs3_math_types.h:110
int right_shift_t
A rightwards arithmetic bit-shift.
Definition: xs3_math_types.h:98
unsigned headroom_t
Headroom of some integer or integer array.
Definition: xs3_math_types.h:86
headroom_t xs3_vect_s16_abs(int16_t a[], const int16_t b[], const unsigned length)
Compute the element-wise absolute value of a 16-bit vector.
Definition: xs3_vect_abs_clip_rect.c:14
headroom_t xs3_vect_s16_max_elementwise(int16_t a[], const int16_t b[], const int16_t c[], const unsigned length, const right_shift_t b_shr, const right_shift_t c_shr)
Get the element-wise maximum of two 16-bit vectors.
Definition: xs3_vect_stats.c:26
headroom_t xs3_vect_s16_scale(int16_t a[], const int16_t b[], const unsigned length, const int16_t c, const right_shift_t a_shr)
Multiply a 16-bit vector by a 16-bit scalar.
Definition: xs3_vect_mul.c:54
headroom_t xs3_vect_s16_add(int16_t a[], const int16_t b[], const int16_t c[], const unsigned length, const right_shift_t b_shr, const right_shift_t c_shr)
Add one 16-bit BFP vector to another.
Definition: xs3_vect_add_sub.c:13
headroom_t xs3_vect_s16_macc(int16_t acc[], const int16_t b[], const int16_t c[], const unsigned length, const right_shift_t acc_shr, const right_shift_t bc_sat)
Multiply one 16-bit vector element-wise by another, and add the result to an accumulator.
Definition: xs3_vect_macc.c:17
headroom_t xs3_vect_s16_rect(int16_t a[], const int16_t b[], const unsigned length)
Rectify the elements of a 16-bit vector.
Definition: xs3_vect_abs_clip_rect.c:78
headroom_t xs3_vect_s16_shr(int16_t a[], const int16_t b[], const unsigned length, const right_shift_t b_shr)
Right-shift the elements of a 16-bit vector by a specified number of bits.
Definition: xs3_vect.c:121
void xs3_vect_s16_inverse(int16_t a[], const int16_t b[], const unsigned length, const unsigned scale)
Compute the inverse of elements of a 16-bit vector.
Definition: xs3_vect_inverse.c:16
headroom_t xs3_vect_s16_headroom(const int16_t b[], const unsigned length)
Calculate the headroom of a 16-bit vector.
Definition: xs3_vect_headroom.c:13
void xs3_vect_s16_set(int16_t a[], const int16_t b, const unsigned length)
Set all elements of a 16-bit vector to the specified value.
Definition: xs3_vect_set.c:13
int32_t xs3_vect_s16_abs_sum(const int16_t b[], const unsigned length)
Compute the sum of the absolute values of elements of a 16-bit vector.
Definition: xs3_vect_stats.c:176
headroom_t xs3_vect_s16_sqrt(int16_t a[], const int16_t b[], const unsigned length, const right_shift_t b_shr, const unsigned depth)
Compute the square roots of elements of a 16-bit vector.
Definition: xs3_vect_sqrt.c:15
headroom_t xs3_vect_s16_mul(int16_t a[], const int16_t b[], const int16_t c[], const unsigned length, const right_shift_t a_shr)
Multiply two 16-bit vectors together element-wise.
Definition: xs3_vect_mul.c:16
headroom_t xs3_vect_s16_nmacc(int16_t acc[], const int16_t b[], const int16_t c[], const unsigned length, const right_shift_t acc_shr, const right_shift_t bc_sat)
Multiply one 16-bit vector element-wise by another, and subtract the result from an accumulator.
Definition: xs3_vect_macc.c:34
int16_t xs3_vect_s16_min(const int16_t b[], const unsigned length)
Find the minimum value in a 16-bit vector.
Definition: xs3_vect_stats.c:70
headroom_t xs3_vect_s16_sub(int16_t a[], const int16_t b[], const int16_t c[], const unsigned length, const right_shift_t b_shr, const right_shift_t c_shr)
Subtract one 16-bit BFP vector from another.
Definition: xs3_vect_add_sub.c:54
headroom_t xs3_vect_s16_add_scalar(int16_t a[], const int16_t b[], const int16_t c, const unsigned length, const right_shift_t b_shr)
Add a scalar to a 16-bit vector.
Definition: xs3_vect.c:216
unsigned xs3_vect_s16_argmin(const int16_t b[], const unsigned length)
Obtain the array index of the minimum element of a 16-bit vector.
Definition: xs3_vect_stats.c:150
int64_t xs3_vect_s16_dot(const int16_t b[], const int16_t c[], const unsigned length)
Compute the inner product of two 16-bit vectors.
Definition: xs3_vect_dot.c:13
unsigned xs3_vect_s16_argmax(const int16_t b[], const unsigned length)
Obtain the array index of the maximum element of a 16-bit vector.
Definition: xs3_vect_stats.c:126
headroom_t xs3_vect_s16_clip(int16_t a[], const int16_t b[], const unsigned length, const int16_t lower_bound, const int16_t upper_bound, const right_shift_t b_shr)
Clamp the elements of a 16-bit vector to a specified range.
Definition: xs3_vect_abs_clip_rect.c:42
int32_t xs3_vect_s16_energy(const int16_t b[], const unsigned length, const right_shift_t b_shr)
Calculate the energy (sum of squares of elements) of a 16-bit vector.
Definition: xs3_vect_stats.c:219
headroom_t xs3_vect_s16_shl(int16_t a[], const int16_t b[], const unsigned length, const left_shift_t b_shl)
Left-shift the elements of a 16-bit vector by a specified number of bits.
Definition: xs3_vect_shl.c:13
int32_t xs3_vect_s16_sum(const int16_t b[], const unsigned length)
Get the sum of elements of a 16-bit vector.
Definition: xs3_vect_sum.c:15
int16_t xs3_vect_s16_max(const int16_t b[], const unsigned length)
Find the maximum value in a 16-bit vector.
Definition: xs3_vect_stats.c:15
headroom_t xs3_vect_s16_min_elementwise(int16_t a[], const int16_t b[], const int16_t c[], const unsigned length, const right_shift_t b_shr, const right_shift_t c_shr)
Get the element-wise minimum of two 16-bit vectors.
Definition: xs3_vect_stats.c:81
void xs3_vect_s16_inverse_prepare(exponent_t *a_exp, unsigned *scale, const int16_t b[], const exponent_t b_exp, const unsigned length)
Obtain the output exponent and scaling parameter used by xs3_vect_s16_inverse().
Definition: xs3_prepare.c:334
void xs3_vect_s16_mul_prepare(exponent_t *a_exp, right_shift_t *a_shr, const exponent_t b_exp, const exponent_t c_exp, const headroom_t b_hr, const headroom_t c_hr)
[xs3_vect_s16_mul]
Definition: xs3_prepare.c:67
void xs3_vect_s16_macc_prepare(exponent_t *new_acc_exp, right_shift_t *acc_shr, right_shift_t *bc_sat, const exponent_t acc_exp, const exponent_t b_exp, const exponent_t c_exp, const headroom_t acc_hr, const headroom_t b_hr, const headroom_t c_hr)
Obtain the output exponent and shifts needed by xs3_vect_s16_macc().
Definition: xs3_prepare.c:19
void xs3_vect_s16_scale_prepare(exponent_t *a_exp, right_shift_t *a_shr, const exponent_t b_exp, const exponent_t c_exp, const headroom_t b_hr, const headroom_t c_hr)
Obtain the output exponent and output shift used by xs3_vect_s16_scale().
Definition: xs3_prepare.c:247
void xs3_vect_s16_sqrt_prepare(exponent_t *a_exp, right_shift_t *b_shr, const exponent_t b_exp, const right_shift_t b_hr)
Obtain the output exponent and shift parameter used by xs3_vect_s16_sqrt().
Definition: xs3_prepare.c:282
void xs3_vect_s16_clip_prepare(exponent_t *a_exp, right_shift_t *b_shr, int16_t *lower_bound, int16_t *upper_bound, const exponent_t b_exp, const exponent_t bound_exp, const headroom_t b_hr)
Obtain the output exponent, input shift and modified bounds used by xs3_vect_s16_clip().
Definition: xs3_prepare.c:90