Home
last modified time | relevance | path

Searched refs:float32_t (Results 1 – 25 of 83) sorted by relevance

1234

/Zephyr-latest/tests/lib/cmsis_dsp/quaternionmath/src/
Df32.c16 #define SNR_ERROR_THRESH ((float32_t)120)
23 const float32_t *input = (const float32_t *)in_com1; in ZTEST()
24 const float32_t *ref = (const float32_t *)ref_norm; in ZTEST()
25 float32_t *output; in ZTEST()
28 output = malloc(length * sizeof(float32_t)); in ZTEST()
51 const float32_t *input = (const float32_t *)in_com1; in ZTEST()
52 const float32_t *ref = (const float32_t *)ref_inv; in ZTEST()
53 float32_t *output; in ZTEST()
56 output = malloc(length * sizeof(float32_t)); in ZTEST()
79 const float32_t *input = (const float32_t *)in_com1; in ZTEST()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/statistics/src/
Df32.c16 #define SNR_ERROR_THRESH ((float32_t)120)
22 float32_t val; in test_arm_max_f32()
26 arm_max_f32((float32_t *)input1, length, &val, &index); in test_arm_max_f32()
29 zassert_equal(val, ((float32_t *)ref_max_val)[ref_index], in test_arm_max_f32()
43 float32_t val; in test_arm_max_no_idx_f32()
46 arm_max_no_idx_f32((float32_t *)input1, length, &val); in test_arm_max_no_idx_f32()
49 zassert_equal(val, ((float32_t *)ref_max_val)[ref_index], in test_arm_max_no_idx_f32()
60 float32_t val; in test_arm_min_f32()
64 arm_min_f32((float32_t *)input1, length, &val, &index); in test_arm_min_f32()
67 zassert_equal(val, ((float32_t *)ref_min_val)[ref_index], in test_arm_min_f32()
[all …]
/Zephyr-latest/tests/subsys/dsp/basicmath/src/
Df32.c16 #define SNR_ERROR_THRESH ((float32_t)120)
22 DSP_DATA float32_t *output; in test_zdsp_add_f32()
25 output = (DSP_DATA float32_t *)malloc(length * sizeof(float32_t)); in test_zdsp_add_f32()
29 zdsp_add_f32((DSP_DATA float32_t *)input1, (DSP_DATA float32_t *)input2, output, length); in test_zdsp_add_f32()
33 test_snr_error_f32(length, output, (float32_t *)ref, in test_zdsp_add_f32()
38 test_rel_error_f32(length, output, (float32_t *)ref, in test_zdsp_add_f32()
55 DSP_DATA float32_t *output; in test_zdsp_add_f32_in_place()
58 output = (DSP_DATA float32_t *)malloc(length * sizeof(float32_t)); in test_zdsp_add_f32_in_place()
62 memcpy(output, input1, length * sizeof(float32_t)); in test_zdsp_add_f32_in_place()
65 zdsp_add_f32(output, (DSP_DATA float32_t *)input2, output, length); in test_zdsp_add_f32_in_place()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/filtering/src/
Dbiquad_f32.c16 #define SNR_ERROR_THRESH ((float32_t)98)
24 const float32_t *input = (const float32_t *)in_default_val; in ZTEST()
25 const float32_t *coeff = (const float32_t *)in_default_coeff; in ZTEST()
26 const float32_t *ref = (const float32_t *)ref_default; in ZTEST()
27 float32_t *state, *output_buf, *output; in ZTEST()
34 state = calloc(128, sizeof(float32_t)); in ZTEST()
43 output_buf = calloc(length + 2, sizeof(float32_t)); in ZTEST()
84 const float32_t *input = (const float32_t *)in_default_val; in ZTEST()
85 const float32_t *coeff = (const float32_t *)in_default_coeff; in ZTEST()
86 const float32_t *ref = (const float32_t *)ref_default; in ZTEST()
[all …]
Dfir_f32.c16 #define SNR_ERROR_THRESH ((float32_t)120)
28 const float32_t *input = (const float32_t *)in_val; in ZTEST()
29 const float32_t *coeff = (const float32_t *)in_coeff; in ZTEST()
30 const float32_t *ref = (const float32_t *)ref_val; in ZTEST()
31 float32_t *state, *output_buf, *output; in ZTEST()
34 float32_t coeff_padded[32]; in ZTEST()
39 state = malloc(2 * 47 * sizeof(float32_t)); in ZTEST()
42 output_buf = malloc(length * sizeof(float32_t)); in ZTEST()
61 memset(coeff_padded, 0, round * sizeof(float32_t)); in ZTEST()
62 memcpy(coeff_padded, coeff, tap_count * sizeof(float32_t)); in ZTEST()
[all …]
Ddecim_f32.c16 #define SNR_ERROR_THRESH ((float32_t)100)
27 const float32_t *input = (const float32_t *)in_val_decim; in ZTEST()
28 const float32_t *coeff = (const float32_t *)in_coeff_decim; in ZTEST()
29 const float32_t *ref = (const float32_t *)ref_decim; in ZTEST()
30 float32_t *state, *output_buf, *output; in ZTEST()
35 state = malloc(STATE_BUF_LEN * sizeof(float32_t)); in ZTEST()
38 output_buf = malloc(length * sizeof(float32_t)); in ZTEST()
90 const float32_t *input = (const float32_t *)in_val_interp; in ZTEST()
91 const float32_t *coeff = (const float32_t *)in_coeff_interp; in ZTEST()
92 const float32_t *ref = (const float32_t *)ref_interp; in ZTEST()
[all …]
Dmisc_f32.c16 #define SNR_ERROR_THRESH ((float32_t)120)
34 float32_t *output, *output_buf; in test_arm_correlate_f32()
37 output_buf = calloc(ref_length + 16, sizeof(float32_t)); in test_arm_correlate_f32()
42 (float32_t *)in_com1, in1_length, in test_arm_correlate_f32()
43 (float32_t *)in_com2, in2_length, output); in test_arm_correlate_f32()
47 test_snr_error_f32(ref_length, (float32_t *)ref, output, in test_arm_correlate_f32()
52 test_close_error_f32(ref_length, (float32_t *)ref, output, in test_arm_correlate_f32()
110 float32_t *output; in test_arm_conv_f32()
113 output = calloc(ref_length, sizeof(float32_t)); in test_arm_conv_f32()
117 (float32_t *)in_com1, in1_length, in test_arm_conv_f32()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/complexmath/src/
Df32.c16 #define SNR_ERROR_THRESH ((float32_t)120)
25 float32_t *output; in test_arm_cmplx_conj_f32()
31 output = malloc(buf_length * sizeof(float32_t)); in test_arm_cmplx_conj_f32()
35 arm_cmplx_conj_f32((float32_t *)input1, output, length); in test_arm_cmplx_conj_f32()
39 test_snr_error_f32(buf_length, output, (float32_t *)ref, in test_arm_cmplx_conj_f32()
44 test_rel_error_f32(buf_length, output, (float32_t *)ref, in test_arm_cmplx_conj_f32()
60 float32_t *output; in test_arm_cmplx_dot_prod_f32()
63 output = malloc(2 * sizeof(float32_t)); in test_arm_cmplx_dot_prod_f32()
68 (float32_t *)input1, (float32_t *)input2, length, in test_arm_cmplx_dot_prod_f32()
73 test_snr_error_f32(2, output, (float32_t *)ref, in test_arm_cmplx_dot_prod_f32()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/interpolation/src/
Df32.c16 #define SNR_ERROR_THRESH ((float32_t)120)
24 const float32_t *input = (const float32_t *)in_linear_x; in test_arm_linear_interp_f32()
25 float32_t *output; in test_arm_linear_interp_f32()
31 inst.pYData = (float32_t *)in_linear_y; in test_arm_linear_interp_f32()
34 output = malloc(length * sizeof(float32_t)); in test_arm_linear_interp_f32()
45 test_snr_error_f32(length, output, (float32_t *)ref_linear, in test_arm_linear_interp_f32()
50 test_rel_error_f32(length, output, (float32_t *)ref_linear, in test_arm_linear_interp_f32()
63 const float32_t *input = (const float32_t *)in_bilinear_x; in test_arm_bilinear_interp_f32()
64 float32_t *output; in test_arm_bilinear_interp_f32()
69 inst.pData = (float32_t *)in_bilinear_y; in test_arm_bilinear_interp_f32()
[all …]
/Zephyr-latest/tests/benchmarks/cmsis_dsp/basicmath/src/
Df32.c153 float32_t *output; in ZTEST()
156 output = malloc(PATTERN_LENGTH * sizeof(float32_t)); in ZTEST()
164 (float32_t *)input1, (float32_t *)input2, output, in ZTEST()
180 float32_t *output; in ZTEST()
183 output = malloc(PATTERN_LENGTH * sizeof(float32_t)); in ZTEST()
191 (float32_t *)input1, (float32_t *)input2, output, in ZTEST()
207 float32_t *output; in ZTEST()
210 output = malloc(PATTERN_LENGTH * sizeof(float32_t)); in ZTEST()
218 (float32_t *)input1, (float32_t *)input2, output, in ZTEST()
234 float32_t *output; in ZTEST()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/fastmath/src/
Df32.c16 #define SNR_ERROR_THRESH ((float32_t)120)
26 float32_t *output; in ZTEST()
29 output = malloc(length * sizeof(float32_t)); in ZTEST()
34 output[index] = arm_cos_f32(((float32_t *)in_angles)[index]); in ZTEST()
39 test_snr_error_f32(length, output, (float32_t *)ref_cos, in ZTEST()
44 test_close_error_f32(length, output, (float32_t *)ref_cos, in ZTEST()
56 float32_t *output; in ZTEST()
59 output = malloc(length * sizeof(float32_t)); in ZTEST()
64 output[index] = arm_sin_f32(((float32_t *)in_angles)[index]); in ZTEST()
69 test_snr_error_f32(length, output, (float32_t *)ref_sin, in ZTEST()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/matrix/src/
Dunary_f32.c16 #define SNR_ERROR_THRESH ((float32_t)120)
20 #define SNR_ERROR_THRESH_INV ((float32_t)67)
24 #define SNR_ERROR_THRESH_CHOL ((float32_t)92)
42 float32_t *tmp1, *tmp2, *output; in test_op2()
51 tmp1 = malloc(MAX_MATRIX_DIM * MAX_MATRIX_DIM * sizeof(float32_t)); in test_op2()
54 tmp2 = malloc(MAX_MATRIX_DIM * MAX_MATRIX_DIM * sizeof(float32_t)); in test_op2()
57 output = malloc(length * sizeof(float32_t)); in test_op2()
76 rows * columns * sizeof(float32_t)); in test_op2()
79 rows * columns * sizeof(float32_t)); in test_op2()
105 test_snr_error_f32(length, output, (float32_t *)ref, in test_op2()
[all …]
Dbinary_f32.c16 #define SNR_ERROR_THRESH ((float32_t)120)
31 float32_t *tmp1, *tmp2, *output; in test_op2()
40 tmp1 = malloc(MAX_MATRIX_DIM * MAX_MATRIX_DIM * sizeof(float32_t)); in test_op2()
43 tmp2 = malloc(MAX_MATRIX_DIM * MAX_MATRIX_DIM * sizeof(float32_t)); in test_op2()
46 output = malloc(length * sizeof(float32_t)); in test_op2()
72 rows * internal * sizeof(float32_t)); in test_op2()
75 internal * columns * sizeof(float32_t)); in test_op2()
97 test_snr_error_f32(length, output, (float32_t *)ref, in test_op2()
102 test_close_error_f32(length, output, (float32_t *)ref, in test_op2()
122 float32_t *tmp1, *tmp2, *output; in test_op2c()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/support/src/
Df32.c24 float32_t *output; in test_arm_copy_f32()
27 output = malloc(length * sizeof(float32_t)); in test_arm_copy_f32()
31 arm_copy_f32((float32_t *)input1, output, length); in test_arm_copy_f32()
35 test_equal_f32(length, (float32_t *)input1, output), in test_arm_copy_f32()
49 float32_t *output; in test_arm_fill_f32()
50 float32_t val = 1.1; in test_arm_fill_f32()
53 output = malloc(length * sizeof(float32_t)); in test_arm_fill_f32()
83 arm_float_to_q31((float32_t *)input1, output, length); in test_arm_float_to_q31()
108 arm_float_to_q15((float32_t *)input1, output, length); in test_arm_float_to_q15()
133 arm_float_to_q7((float32_t *)input1, output, length); in test_arm_float_to_q7()
[all …]
Dbarycenter_f32.c24 const float32_t *input_val = (const float32_t *)in_barycenter_val; in ZTEST()
25 const float32_t *input_coeff = (const float32_t *)in_barycenter_coeff; in ZTEST()
26 float32_t *output, *output_buf; in ZTEST()
29 output_buf = malloc(length * sizeof(float32_t)); in ZTEST()
53 length, output_buf, (float32_t *)ref_barycenter, in ZTEST()
/Zephyr-latest/tests/lib/cmsis_dsp/distance/src/
Df32.c38 const float32_t *input1 = (const float32_t *)dinput1; in test_arm_distance_f32()
39 const float32_t *input2 = (const float32_t *)dinput2; in test_arm_distance_f32()
40 float32_t *output, *tmp1 = NULL, *tmp2 = NULL; in test_arm_distance_f32()
43 output = malloc(length * sizeof(float32_t)); in test_arm_distance_f32()
48 tmp1 = malloc(DIMS_VEC * sizeof(float32_t)); in test_arm_distance_f32()
51 tmp2 = malloc(DIMS_VEC * sizeof(float32_t)); in test_arm_distance_f32()
57 float32_t val; in test_arm_distance_f32()
61 memcpy(tmp1, input1, DIMS_VEC * sizeof(float32_t)); in test_arm_distance_f32()
62 memcpy(tmp2, input2, DIMS_VEC * sizeof(float32_t)); in test_arm_distance_f32()
114 length, output, (float32_t *)ref, ABS_ERROR_THRESH), in test_arm_distance_f32()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/svm/src/
Df32.c18 const float32_t *params = (const float32_t *)in_param; \
23 const float32_t intercept = \
25 const float32_t *svec = params; \
26 const float32_t *dual_coeff = params + (vec_dims * svec_count)
30 const float32_t coeff0 = \
32 const float32_t gamma = \
36 const float32_t gamma = \
40 const float32_t coeff0 = \
42 const float32_t gamma = \
52 const float32_t *input = (const float32_t *)in_linear_val; in ZTEST()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/bayes/src/
Df32.c29 const float32_t *params = (const float32_t *)in_param; in ZTEST()
30 const float32_t *input = (const float32_t *)in_val; in ZTEST()
31 float32_t *output_probs_buf, *output_probs; in ZTEST()
33 float32_t *temp; in ZTEST()
45 malloc(pattern_count * class_count * sizeof(float32_t)); in ZTEST()
55 temp = malloc(pattern_count * class_count * sizeof(float32_t)); in ZTEST()
74 (float32_t *)ref_prob, REL_ERROR_THRESH), in ZTEST()
/Zephyr-latest/include/zephyr/dsp/
Dbasicmath.h89 DSP_FUNC_SCOPE void zdsp_mult_f32(const DSP_DATA float32_t *src_a, const DSP_DATA float32_t *src_b,
90 DSP_DATA float32_t *dst, uint32_t block_size);
115 DSP_FUNC_SCOPE void zdsp_add_f32(const DSP_DATA float32_t *src_a, const DSP_DATA float32_t *src_b,
116 DSP_DATA float32_t *dst, uint32_t block_size);
186 DSP_FUNC_SCOPE void zdsp_sub_f32(const DSP_DATA float32_t *src_a, const DSP_DATA float32_t *src_b,
187 DSP_DATA float32_t *dst, uint32_t block_size);
271 DSP_FUNC_SCOPE void zdsp_scale_f32(const DSP_DATA float32_t *src, float32_t scale,
272 DSP_DATA float32_t *dst, uint32_t block_size);
349 DSP_FUNC_SCOPE void zdsp_abs_f32(const DSP_DATA float32_t *src, DSP_DATA float32_t *dst,
418 DSP_FUNC_SCOPE void zdsp_dot_prod_f32(const DSP_DATA float32_t *src_a,
[all …]
Dutils.h46 #define Z_SHIFT_Q7_TO_F32(src, m) ((float32_t)(((src << m)) / (float32_t)(1U << 7)))
55 #define Z_SHIFT_Q15_TO_F32(src, m) ((float32_t)((src << m) / (float32_t)(1U << 15)))
64 #define Z_SHIFT_Q31_TO_F32(src, m) ((float32_t)(((int64_t)src) << m) / (float32_t)(1U << 31))
/Zephyr-latest/tests/lib/cmsis_dsp/common/
Dtest_common.h89 size_t length, const float32_t *a, const float32_t *b) in test_equal_f32()
190 size_t length, const float32_t *a, const float32_t *b, in test_near_equal_f32()
191 float32_t threshold) in test_near_equal_f32()
301 size_t length, const float32_t *a, const float32_t *b, in test_rel_error_f32()
302 float32_t threshold) in test_rel_error_f32()
305 float32_t rel, delta, average; in test_rel_error_f32()
329 float32_t rel, delta, average; in test_rel_error_f16()
365 size_t length, const float32_t *ref, const float32_t *val, in test_close_error_f32()
366 float32_t abs_threshold, float32_t rel_threshold) in test_close_error_f32()
383 float32_t abs_threshold, float32_t rel_threshold) in test_close_error_f16()
[all …]
Dmath_helper.h204 float32_t testVal, refVal; in arm_snr_q31()
208 testVal = ((float32_t)pTest[i]) / 2147483648.0f; in arm_snr_q31()
209 refVal = ((float32_t)pRef[i]) / 2147483648.0f; in arm_snr_q31()
232 float32_t testVal, refVal; in arm_snr_q15()
235 testVal = ((float32_t)pTest[i]) / 32768.0f; in arm_snr_q15()
236 refVal = ((float32_t)pRef[i]) / 32768.0f; in arm_snr_q15()
258 float32_t testVal, refVal; in arm_snr_q7()
261 testVal = ((float32_t)pTest[i]) / 128.0f; in arm_snr_q7()
262 refVal = ((float32_t)pRef[i]) / 128.0f; in arm_snr_q7()
/Zephyr-latest/subsys/dsp/cmsis/public/
Dzdsp_backend.h34 static inline void zdsp_mult_f32(const float32_t *src_a, const float32_t *src_b, float32_t *dst, in zdsp_mult_f32()
54 static inline void zdsp_add_f32(const float32_t *src_a, const float32_t *src_b, float32_t *dst, in zdsp_add_f32()
74 static inline void zdsp_sub_f32(const float32_t *src_a, const float32_t *src_b, float32_t *dst, in zdsp_sub_f32()
96 static inline void zdsp_scale_f32(const float32_t *src, float32_t scale, float32_t *dst, in zdsp_scale_f32()
114 static inline void zdsp_abs_f32(const float32_t *src, float32_t *dst, uint32_t block_size) in zdsp_abs_f32()
131 static inline void zdsp_negate_f32(const float32_t *src, float32_t *dst, uint32_t block_size) in zdsp_negate_f32()
151 static inline void zdsp_dot_prod_f32(const float32_t *src_a, const float32_t *src_b, in zdsp_dot_prod_f32()
152 uint32_t block_size, float32_t *dst) in zdsp_dot_prod_f32()
184 static inline void zdsp_offset_f32(const float32_t *src, float32_t offset, float32_t *dst, in zdsp_offset_f32()
205 static inline void zdsp_clip_f32(const float32_t *src, float32_t *dst, float32_t low, in zdsp_clip_f32()
[all …]
/Zephyr-latest/subsys/dsp/arcmwdt/public/
Dzdsp_backend.h37 static inline void zdsp_mult_f32(const DSP_DATA float32_t *src_a, const DSP_DATA float32_t *src_b, in zdsp_mult_f32()
38 DSP_DATA float32_t *dst, uint32_t block_size) in zdsp_mult_f32()
58 static inline void zdsp_add_f32(const DSP_DATA float32_t *src_a, const DSP_DATA float32_t *src_b, in zdsp_add_f32()
59 DSP_DATA float32_t *dst, uint32_t block_size) in zdsp_add_f32()
79 static inline void zdsp_sub_f32(const DSP_DATA float32_t *src_a, const DSP_DATA float32_t *src_b, in zdsp_sub_f32()
80 DSP_DATA float32_t *dst, uint32_t block_size) in zdsp_sub_f32()
101 static inline void zdsp_scale_f32(const DSP_DATA float32_t *src, float32_t scale, in zdsp_scale_f32()
102 DSP_DATA float32_t *dst, uint32_t block_size) in zdsp_scale_f32()
119 static inline void zdsp_abs_f32(const DSP_DATA float32_t *src, DSP_DATA float32_t *dst, in zdsp_abs_f32()
139 static inline void zdsp_negate_f32(const DSP_DATA float32_t *src, DSP_DATA float32_t *dst, in zdsp_negate_f32()
[all …]
/Zephyr-latest/tests/lib/cmsis_dsp/transform/src/
Drf32.c17 #define SNR_ERROR_THRESH ((float32_t)120)
24 float32_t *output, *scratch; in test_arm_rfft_f32_real_backend()
30 output = malloc(length * sizeof(float32_t)); in test_arm_rfft_f32_real_backend()
33 scratch = calloc(length + 2, sizeof(float32_t)); /* see #24701 */ in test_arm_rfft_f32_real_backend()
37 memcpy(scratch, input, length * sizeof(float32_t)); in test_arm_rfft_f32_real_backend()
44 test_snr_error_f32(length, output, (float32_t *)ref, in test_arm_rfft_f32_real_backend()

1234