Lines Matching +full:data +full:- +full:shift
4 * SPDX-License-Identifier: Apache-2.0
23 #define TEST_CASES_SHIFT_F32_TO_Q7 (-1.0F, 0, -128), (1.0F, 0, 127), (1.0F, 7, 1), (-1.0F, 7, -1)
26 (-1.0F, 0, -32768), (1.0F, 0, 32767), (1.0F, 15, 1), (-1.0F, 15, -1)
29 (-1.0F, 0, -2147483648), (1.0F, 0, 2147483647), (1.0F, 31, 1), (-1.0F, 31, -1)
31 static void test_shift_f32_to_q7(const float32_t data, const uint32_t shift, in test_shift_f32_to_q7() argument
34 q7_t shifted_data = Z_SHIFT_F32_TO_Q7(data, shift); in test_shift_f32_to_q7()
37 "Conversion failed: %f shifted by %d = %d (expected %d)", (double)data, shift, in test_shift_f32_to_q7()
41 static void test_shift_f32_to_q15(const float32_t data, const uint32_t shift, in test_shift_f32_to_q15() argument
44 q15_t shifted_data = Z_SHIFT_F32_TO_Q15(data, shift); in test_shift_f32_to_q15()
47 "Conversion failed: %f shifted by %d = %d (expected %d)", (double)data, shift, in test_shift_f32_to_q15()
51 static void test_shift_f32_to_q31(const float32_t data, const uint32_t shift, in test_shift_f32_to_q31() argument
54 q31_t shifted_data = Z_SHIFT_F32_TO_Q31(data, shift); in test_shift_f32_to_q31()
57 "Conversion failed: %f shifted by %d = %d (expected %d)", (double)data, shift, in test_shift_f32_to_q31()