Home
last modified time | relevance | path

Searched refs:float16_t (Results 1 – 22 of 22) sorted by relevance

/Zephyr-latest/include/zephyr/dsp/
Dbasicmath_f16.h32 DSP_FUNC_SCOPE void zdsp_mult_f16(const float16_t *src_a, const float16_t *src_b, float16_t *dst,
43 DSP_FUNC_SCOPE void zdsp_add_f16(const float16_t *src_a, const float16_t *src_b, float16_t *dst,
54 DSP_FUNC_SCOPE void zdsp_sub_f16(const float16_t *src_a, const float16_t *src_b, float16_t *dst,
65 DSP_FUNC_SCOPE void zdsp_scale_f16(const float16_t *src, float16_t scale, float16_t *dst,
75 DSP_FUNC_SCOPE void zdsp_abs_f16(const float16_t *src, float16_t *dst, uint32_t block_size);
85 DSP_FUNC_SCOPE void zdsp_dot_prod_f16(const float16_t *src_a, const float16_t *src_b,
86 uint32_t block_size, float16_t *result);
96 DSP_FUNC_SCOPE void zdsp_offset_f16(const float16_t *src, float16_t offset, float16_t *dst,
106 DSP_FUNC_SCOPE void zdsp_negate_f16(const float16_t *src, float16_t *dst, uint32_t block_size);
117 DSP_FUNC_SCOPE void zdsp_clip_f16(const float16_t *src, float16_t *dst, float16_t low,
[all …]
Dtypes.h48 typedef __fp16 float16_t; typedef
/Zephyr-latest/subsys/dsp/cmsis/public/
Dzdsp_backend_f16.h19 static inline void zdsp_mult_f16(const float16_t *src_a, const float16_t *src_b, float16_t *dst, in zdsp_mult_f16()
25 static inline void zdsp_add_f16(const float16_t *src_a, const float16_t *src_b, float16_t *dst, in zdsp_add_f16()
31 static inline void zdsp_sub_f16(const float16_t *src_a, const float16_t *src_b, float16_t *dst, in zdsp_sub_f16()
37 static inline void zdsp_scale_f16(const float16_t *src, float16_t scale, float16_t *dst, in zdsp_scale_f16()
43 static inline void zdsp_abs_f16(const float16_t *src, float16_t *dst, uint32_t block_size) in zdsp_abs_f16()
48 static inline void zdsp_dot_prod_f16(const float16_t *src_a, const float16_t *src_b, in zdsp_dot_prod_f16()
49 uint32_t block_size, float16_t *result) in zdsp_dot_prod_f16()
54 static inline void zdsp_offset_f16(const float16_t *src, float16_t offset, float16_t *dst, in zdsp_offset_f16()
60 static inline void zdsp_negate_f16(const float16_t *src, float16_t *dst, uint32_t block_size) in zdsp_negate_f16()
65 static inline void zdsp_clip_f16(const float16_t *src, float16_t *dst, float16_t low, in zdsp_clip_f16()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/statistics/src/
Df16.c38 float16_t val; in test_arm_max_f16()
42 arm_max_f16((float16_t *)input1, length, &val, &index); in test_arm_max_f16()
45 zassert_equal(val, ((float16_t *)ref_max_val)[ref_index], in test_arm_max_f16()
59 float16_t val; in test_arm_max_no_idx_f16()
62 arm_max_no_idx_f16((float16_t *)input1, length, &val); in test_arm_max_no_idx_f16()
65 zassert_equal(val, ((float16_t *)ref_max_val)[ref_index], in test_arm_max_no_idx_f16()
76 float16_t val; in test_arm_min_f16()
80 arm_min_f16((float16_t *)input1, length, &val, &index); in test_arm_min_f16()
83 zassert_equal(val, ((float16_t *)ref_min_val)[ref_index], in test_arm_min_f16()
97 float16_t val; in test_arm_absmax_f16()
[all …]
/Zephyr-latest/tests/subsys/dsp/basicmath/src/
Df16.c24 float16_t *output; in test_zdsp_add_f16()
27 output = malloc(length * sizeof(float16_t)); in test_zdsp_add_f16()
31 zdsp_add_f16((float16_t *)input1, (float16_t *)input2, output, length); in test_zdsp_add_f16()
35 test_snr_error_f16(length, output, (float16_t *)ref, in test_zdsp_add_f16()
40 test_rel_error_f16(length, output, (float16_t *)ref, in test_zdsp_add_f16()
57 float16_t *output; in test_zdsp_add_f16_in_place()
60 output = malloc(length * sizeof(float16_t)); in test_zdsp_add_f16_in_place()
64 memcpy(output, (float16_t *)input1, length * sizeof(float16_t)); in test_zdsp_add_f16_in_place()
67 zdsp_add_f16(output, (float16_t *)input2, output, length); in test_zdsp_add_f16_in_place()
70 zassert_true(test_snr_error_f16(length, output, (float16_t *)ref, SNR_ERROR_THRESH), in test_zdsp_add_f16_in_place()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/filtering/src/
Dbiquad_f16.c25 const float16_t *input = (const float16_t *)in_default_val; in ZTEST()
26 const float16_t *coeff = (const float16_t *)in_default_coeff; in ZTEST()
27 const float16_t *ref = (const float16_t *)ref_default; in ZTEST()
28 float16_t *state, *output_buf, *output; in ZTEST()
35 state = calloc(128, sizeof(float16_t)); in ZTEST()
44 output_buf = calloc(length + 2, sizeof(float16_t)); in ZTEST()
86 const float16_t *input = (const float16_t *)in_default_val; in ZTEST()
87 const float16_t *coeff = (const float16_t *)in_default_coeff; in ZTEST()
88 const float16_t *ref = (const float16_t *)ref_default; in ZTEST()
89 float16_t *state, *output_buf, *output; in ZTEST()
[all …]
Dfir_f16.c28 const float16_t *input = (const float16_t *)in_val; in ZTEST()
29 const float16_t *coeff = (const float16_t *)in_coeff; in ZTEST()
30 const float16_t *ref = (const float16_t *)ref_val; in ZTEST()
31 float16_t *state, *output_buf, *output; in ZTEST()
34 float16_t coeff_padded[32]; in ZTEST()
39 state = malloc(2 * 47 * sizeof(float16_t)); in ZTEST()
42 output_buf = malloc(length * sizeof(float16_t)); in ZTEST()
61 memset(coeff_padded, 0, round * sizeof(float16_t)); in ZTEST()
62 memcpy(coeff_padded, coeff, tap_count * sizeof(float16_t)); in ZTEST()
73 input = (const float16_t *)in_val; in ZTEST()
Dmisc_f16.c27 float16_t *output; in test_arm_correlate_f16()
30 output = calloc(ref_length, sizeof(float16_t)); in test_arm_correlate_f16()
34 (float16_t *)in_com1, in1_length, in test_arm_correlate_f16()
35 (float16_t *)in_com2, in2_length, output); in test_arm_correlate_f16()
39 test_snr_error_f16(ref_length, (float16_t *)ref, output, in test_arm_correlate_f16()
44 test_close_error_f16(ref_length, (float16_t *)ref, output, in test_arm_correlate_f16()
107 float16_t *output;
110 output = calloc(ref_length, sizeof(float16_t));
114 (float16_t *)in_com1, in1_length,
115 (float16_t *)in_com2, in2_length, output);
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/fastmath/src/
Df16.c41 float16_t *output;
44 output = malloc(length * sizeof(float16_t));
49 output[index] = arm_cos_f16(((float16_t *)in_angles)[index]);
54 test_snr_error_f16(length, output, (float16_t *)ref_cos,
59 test_close_error_f16(length, output, (float16_t *)ref_cos,
71 float16_t *output;
74 output = malloc(length * sizeof(float16_t));
79 output[index] = arm_sin_f16(((float16_t *)in_angles)[index]);
84 test_snr_error_f16(length, output, (float16_t *)ref_sin,
89 test_close_error_f16(length, output, (float16_t *)ref_sin,
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/complexmath/src/
Df16.c25 float16_t *output; in test_arm_cmplx_conj_f16()
31 output = malloc(buf_length * sizeof(float16_t)); in test_arm_cmplx_conj_f16()
35 arm_cmplx_conj_f16((float16_t *)input1, output, length); in test_arm_cmplx_conj_f16()
39 test_snr_error_f16(buf_length, output, (float16_t *)ref, in test_arm_cmplx_conj_f16()
44 test_rel_error_f16(buf_length, output, (float16_t *)ref, in test_arm_cmplx_conj_f16()
60 float16_t *output; in test_arm_cmplx_dot_prod_f16()
63 output = malloc(2 * sizeof(float16_t)); in test_arm_cmplx_dot_prod_f16()
68 (float16_t *)input1, (float16_t *)input2, length, in test_arm_cmplx_dot_prod_f16()
73 test_snr_error_f16(2, output, (float16_t *)ref, in test_arm_cmplx_dot_prod_f16()
78 test_rel_error_f16(2, output, (float16_t *)ref, in test_arm_cmplx_dot_prod_f16()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/interpolation/src/
Df16.c16 #define SNR_ERROR_THRESH ((float16_t)55)
25 const float16_t *input = (const float16_t *)in_linear_x; in ZTEST()
26 float16_t *output; in ZTEST()
32 inst.pYData = (float16_t *)in_linear_y; in ZTEST()
35 output = malloc(length * sizeof(float16_t)); in ZTEST()
46 test_snr_error_f16(length, output, (float16_t *)ref_linear, in ZTEST()
51 test_close_error_f16(length, output, (float16_t *)ref_linear, in ZTEST()
64 const float16_t *input = (const float16_t *)in_bilinear_x; in ZTEST()
65 float16_t *output; in ZTEST()
70 inst.pData = (float16_t *)in_bilinear_y; in ZTEST()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/support/src/
Df16.c33 float16_t *output; in test_arm_copy_f16()
36 output = malloc(length * sizeof(float16_t)); in test_arm_copy_f16()
40 arm_copy_f16((float16_t *)input1, output, length); in test_arm_copy_f16()
44 test_equal_f16(length, (float16_t *)input1, output), in test_arm_copy_f16()
58 float16_t *output; in test_arm_fill_f16()
59 float16_t val = 1.1; in test_arm_fill_f16()
62 output = malloc(length * sizeof(float16_t)); in test_arm_fill_f16()
92 arm_f16_to_q15((float16_t *)input1, output, length); in test_arm_f16_to_q15()
117 arm_f16_to_float((float16_t *)input1, output, length); in test_arm_f16_to_float()
136 float16_t *output; in test_arm_q15_to_f16()
[all …]
Dbarycenter_f16.c24 const float16_t *input_val = (const float16_t *)in_barycenter_val; in ZTEST()
25 const float16_t *input_coeff = (const float16_t *)in_barycenter_coeff; in ZTEST()
26 float16_t *output, *output_buf; in ZTEST()
29 output_buf = malloc(length * sizeof(float16_t)); in ZTEST()
53 length, output_buf, (float16_t *)ref_barycenter, in ZTEST()
/Zephyr-latest/tests/lib/cmsis_dsp/matrix/src/
Dunary_f16.c46 float16_t *tmp1, *tmp2, *output; in test_op2()
55 tmp1 = malloc(MAX_MATRIX_DIM * MAX_MATRIX_DIM * sizeof(float16_t)); in test_op2()
58 tmp2 = malloc(MAX_MATRIX_DIM * MAX_MATRIX_DIM * sizeof(float16_t)); in test_op2()
61 output = malloc(length * sizeof(float16_t)); in test_op2()
80 rows * columns * sizeof(float16_t)); in test_op2()
83 rows * columns * sizeof(float16_t)); in test_op2()
109 test_snr_error_f16(length, output, (float16_t *)ref, in test_op2()
114 test_close_error_f16(length, output, (float16_t *)ref, in test_op2()
136 float16_t *tmp1, *output; in test_op1()
144 tmp1 = malloc(MAX_MATRIX_DIM * MAX_MATRIX_DIM * sizeof(float16_t)); in test_op1()
[all …]
Dbinary_f16.c31 float16_t *tmp1, *tmp2, *output; in test_op2()
40 tmp1 = malloc(MAX_MATRIX_DIM * MAX_MATRIX_DIM * sizeof(float16_t)); in test_op2()
43 tmp2 = malloc(MAX_MATRIX_DIM * MAX_MATRIX_DIM * sizeof(float16_t)); in test_op2()
46 output = malloc(length * sizeof(float16_t)); in test_op2()
72 rows * internal * sizeof(float16_t)); in test_op2()
75 internal * columns * sizeof(float16_t)); in test_op2()
97 test_snr_error_f16(length, output, (float16_t *)ref, in test_op2()
102 test_close_error_f16(length, output, (float16_t *)ref, in test_op2()
122 float16_t *tmp1, *tmp2, *output; in test_op2c()
131 tmp1 = malloc(2 * MAX_MATRIX_DIM * MAX_MATRIX_DIM * sizeof(float16_t)); in test_op2c()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/distance/src/
Df16.c40 const float16_t *input1 = (const float16_t *)dinput1; in test_arm_distance_f16()
41 const float16_t *input2 = (const float16_t *)dinput2; in test_arm_distance_f16()
42 float16_t *output, *tmp1 = NULL, *tmp2 = NULL; in test_arm_distance_f16()
45 output = malloc(length * sizeof(float16_t)); in test_arm_distance_f16()
50 tmp1 = malloc(DIMS_VEC * sizeof(float16_t)); in test_arm_distance_f16()
53 tmp2 = malloc(DIMS_VEC * sizeof(float16_t)); in test_arm_distance_f16()
59 float16_t val; in test_arm_distance_f16()
63 memcpy(tmp1, input1, DIMS_VEC * sizeof(float16_t)); in test_arm_distance_f16()
64 memcpy(tmp2, input2, DIMS_VEC * sizeof(float16_t)); in test_arm_distance_f16()
118 length, output, (float16_t *)ref, in test_arm_distance_f16()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/svm/src/
Df16.c18 const float16_t *params = (const float16_t *)in_param; \
23 const float16_t intercept = \
25 const float16_t *svec = params; \
26 const float16_t *dual_coeff = params + (vec_dims * svec_count)
30 const float16_t coeff0 = \
32 const float16_t gamma = \
36 const float16_t gamma = \
40 const float16_t coeff0 = \
42 const float16_t gamma = \
52 const float16_t *input = (const float16_t *)in_linear_val; in ZTEST()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/bayes/src/
Df16.c31 const float16_t *params = (const float16_t *)in_param; in ZTEST()
32 const float16_t *input = (const float16_t *)in_val; in ZTEST()
33 float16_t *output_probs_buf, *output_probs; in ZTEST()
35 float16_t *temp; in ZTEST()
47 malloc(pattern_count * class_count * sizeof(float16_t)); in ZTEST()
57 temp = malloc(pattern_count * class_count * sizeof(float16_t)); in ZTEST()
76 (float16_t *)ref_prob, REL_ERROR_THRESH), in ZTEST()
/Zephyr-latest/tests/lib/cmsis_dsp/common/
Dtest_common.h104 size_t length, const float16_t *a, const float16_t *b) in test_equal_f16()
206 size_t length, const float16_t *a, const float16_t *b, in test_near_equal_f16()
207 float16_t threshold) in test_near_equal_f16()
325 size_t length, const float16_t *a, const float16_t *b, in test_rel_error_f16()
326 float16_t threshold) in test_rel_error_f16()
382 size_t length, const float16_t *ref, const float16_t *val, in test_close_error_f16()
420 size_t length, const float16_t *a, const float16_t *b, in test_snr_error_f16()
Dmath_helper.h138 static inline float arm_snr_f16(const float16_t *pRef, const float16_t *pTest, in arm_snr_f16()
/Zephyr-latest/tests/lib/cmsis_dsp/transform/src/
Drf16.c24 float16_t *output, *scratch; in test_arm_rfft_f16_real_backend()
30 output = malloc(length * sizeof(float16_t)); in test_arm_rfft_f16_real_backend()
33 scratch = calloc(length + 2, sizeof(float16_t)); /* see #24701 */ in test_arm_rfft_f16_real_backend()
37 memcpy(scratch, input, length * sizeof(float16_t)); in test_arm_rfft_f16_real_backend()
44 test_snr_error_f16(length, output, (float16_t *)ref, in test_arm_rfft_f16_real_backend()
Dcf16.c23 float16_t *output; in test_arm_cfft_f16_cmplx_backend()
33 output = malloc(length * sizeof(float16_t)); in test_arm_cfft_f16_cmplx_backend()
37 memcpy(output, input, length * sizeof(float16_t)); in test_arm_cfft_f16_cmplx_backend()
44 test_snr_error_f16(length, output, (float16_t *)ref, in test_arm_cfft_f16_cmplx_backend()