tests: lib: cmsis_dsp: complexmath: Add F16 tests for 1.9.0

This commit adds the complexmath F16 test patterns and implementations
for the CMSIS-DSP 1.9.0.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
Stephanos Ioannidis 2021-08-19 21:42:10 +09:00 committed by Carles Cufí
parent 112136e6ba
commit d4a7e7927e
4 changed files with 715 additions and 3 deletions

View File

@ -4,5 +4,11 @@ cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(cmsis_dsp_complexmath)
FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})
target_sources(app PRIVATE
src/q15.c
src/q31.c
src/f32.c
src/main.c
)
target_sources_ifdef(CONFIG_CMSIS_DSP_FLOAT16 app PRIVATE src/f16.c)

View File

@ -0,0 +1,250 @@
/*
* Copyright (c) 2021 Stephanos Ioannidis <root@stephanos.io>
* Copyright (C) 2010-2021 ARM Limited or its affiliates. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <ztest.h>
#include <zephyr.h>
#include <stdlib.h>
#include <arm_math_f16.h>
#include "../../common/test_common.h"
#include "f16.pat"
#define SNR_ERROR_THRESH ((float32_t)39)
#define REL_ERROR_THRESH (6.0e-2)
static void test_arm_cmplx_conj_f16(
const uint16_t *input1, const uint16_t *ref, size_t length)
{
size_t buf_length;
float16_t *output;
/* Complex number buffer length is twice the data length */
buf_length = 2 * length;
/* Allocate output buffer */
output = malloc(buf_length * sizeof(float16_t));
zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
/* Run test function */
arm_cmplx_conj_f16((float16_t *)input1, output, length);
/* Validate output */
zassert_true(
test_snr_error_f16(buf_length, output, (float16_t *)ref,
SNR_ERROR_THRESH),
ASSERT_MSG_SNR_LIMIT_EXCEED);
zassert_true(
test_rel_error_f16(buf_length, output, (float16_t *)ref,
REL_ERROR_THRESH),
ASSERT_MSG_REL_ERROR_LIMIT_EXCEED);
/* Free output buffer */
free(output);
}
DEFINE_TEST_VARIANT3(arm_cmplx_conj_f16, 7, in_com1, ref_conj, 7);
DEFINE_TEST_VARIANT3(arm_cmplx_conj_f16, 16, in_com1, ref_conj, 16);
DEFINE_TEST_VARIANT3(arm_cmplx_conj_f16, 23, in_com1, ref_conj, 23);
static void test_arm_cmplx_dot_prod_f16(
const uint16_t *input1, const uint16_t *input2, const uint16_t *ref,
size_t length)
{
float16_t *output;
/* Allocate output buffer */
output = malloc(2 * sizeof(float16_t));
zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
/* Run test function */
arm_cmplx_dot_prod_f16(
(float16_t *)input1, (float16_t *)input2, length,
&output[0], &output[1]);
/* Validate output */
zassert_true(
test_snr_error_f16(2, output, (float16_t *)ref,
SNR_ERROR_THRESH),
ASSERT_MSG_SNR_LIMIT_EXCEED);
zassert_true(
test_rel_error_f16(2, output, (float16_t *)ref,
REL_ERROR_THRESH),
ASSERT_MSG_REL_ERROR_LIMIT_EXCEED);
/* Free output buffer */
free(output);
}
DEFINE_TEST_VARIANT4(arm_cmplx_dot_prod_f16, 7, in_com1, in_com2, ref_dot_prod_3, 7);
DEFINE_TEST_VARIANT4(arm_cmplx_dot_prod_f16, 16, in_com1, in_com2, ref_dot_prod_4n, 16);
DEFINE_TEST_VARIANT4(arm_cmplx_dot_prod_f16, 23, in_com1, in_com2, ref_dot_prod_4n1, 23);
static void test_arm_cmplx_mag_f16(
const uint16_t *input1, const uint16_t *ref, size_t length)
{
float16_t *output;
/* Allocate output buffer */
output = malloc(length * sizeof(float16_t));
zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
/* Run test function */
arm_cmplx_mag_f16((float16_t *)input1, output, length);
/* Validate output */
zassert_true(
test_snr_error_f16(length, output, (float16_t *)ref,
SNR_ERROR_THRESH),
ASSERT_MSG_SNR_LIMIT_EXCEED);
zassert_true(
test_rel_error_f16(length, output, (float16_t *)ref,
REL_ERROR_THRESH),
ASSERT_MSG_REL_ERROR_LIMIT_EXCEED);
/* Free output buffer */
free(output);
}
DEFINE_TEST_VARIANT3(arm_cmplx_mag_f16, 7, in_com1, ref_mag, 7);
DEFINE_TEST_VARIANT3(arm_cmplx_mag_f16, 16, in_com1, ref_mag, 16);
DEFINE_TEST_VARIANT3(arm_cmplx_mag_f16, 23, in_com1, ref_mag, 23);
static void test_arm_cmplx_mag_squared_f16(
const uint16_t *input1, const uint16_t *ref, size_t length)
{
float16_t *output;
/* Allocate output buffer */
output = malloc(length * sizeof(float16_t));
zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
/* Run test function */
arm_cmplx_mag_squared_f16((float16_t *)input1, output, length);
/* Validate output */
zassert_true(
test_snr_error_f16(length, output, (float16_t *)ref,
SNR_ERROR_THRESH),
ASSERT_MSG_SNR_LIMIT_EXCEED);
zassert_true(
test_rel_error_f16(length, output, (float16_t *)ref,
REL_ERROR_THRESH),
ASSERT_MSG_REL_ERROR_LIMIT_EXCEED);
/* Free output buffer */
free(output);
}
DEFINE_TEST_VARIANT3(arm_cmplx_mag_squared_f16, 7, in_com1, ref_mag_squared, 7);
DEFINE_TEST_VARIANT3(arm_cmplx_mag_squared_f16, 16, in_com1, ref_mag_squared, 16);
DEFINE_TEST_VARIANT3(arm_cmplx_mag_squared_f16, 23, in_com1, ref_mag_squared, 23);
static void test_arm_cmplx_mult_cmplx_f16(
const uint16_t *input1, const uint16_t *input2, const uint16_t *ref,
size_t length)
{
size_t buf_length;
float16_t *output;
/* Complex number buffer length is twice the data length */
buf_length = 2 * length;
/* Allocate output buffer */
output = malloc(buf_length * sizeof(float16_t));
zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
/* Run test function */
arm_cmplx_mult_cmplx_f16(
(float16_t *)input1, (float16_t *)input2, output, length);
/* Validate output */
zassert_true(
test_snr_error_f16(buf_length, output, (float16_t *)ref,
SNR_ERROR_THRESH),
ASSERT_MSG_SNR_LIMIT_EXCEED);
zassert_true(
test_rel_error_f16(buf_length, output, (float16_t *)ref,
REL_ERROR_THRESH),
ASSERT_MSG_REL_ERROR_LIMIT_EXCEED);
/* Free output buffer */
free(output);
}
DEFINE_TEST_VARIANT4(arm_cmplx_mult_cmplx_f16, 7, in_com1, in_com2, ref_mult_cmplx, 7);
DEFINE_TEST_VARIANT4(arm_cmplx_mult_cmplx_f16, 16, in_com1, in_com2, ref_mult_cmplx, 16);
DEFINE_TEST_VARIANT4(arm_cmplx_mult_cmplx_f16, 23, in_com1, in_com2, ref_mult_cmplx, 23);
static void test_arm_cmplx_mult_real_f16(
const uint16_t *input1, const uint16_t *input2, const uint16_t *ref,
size_t length)
{
size_t buf_length;
float16_t *output;
/* Complex number buffer length is twice the data length */
buf_length = 2 * length;
/* Allocate output buffer */
output = malloc(buf_length * sizeof(float16_t));
zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);
/* Run test function */
arm_cmplx_mult_real_f16(
(float16_t *)input1, (float16_t *)input2, output, length);
/* Validate output */
zassert_true(
test_snr_error_f16(
buf_length, output, (float16_t *)ref,
SNR_ERROR_THRESH),
ASSERT_MSG_SNR_LIMIT_EXCEED);
zassert_true(
test_rel_error_f16(
buf_length, output, (float16_t *)ref,
REL_ERROR_THRESH),
ASSERT_MSG_REL_ERROR_LIMIT_EXCEED);
/* Free output buffer */
free(output);
}
DEFINE_TEST_VARIANT4(arm_cmplx_mult_real_f16, 7, in_com1, in_com3, ref_mult_real, 7);
DEFINE_TEST_VARIANT4(arm_cmplx_mult_real_f16, 16, in_com1, in_com3, ref_mult_real, 16);
DEFINE_TEST_VARIANT4(arm_cmplx_mult_real_f16, 23, in_com1, in_com3, ref_mult_real, 23);
void test_complexmath_f16(void)
{
ztest_test_suite(complexmath_f16,
ztest_unit_test(test_arm_cmplx_conj_f16_7),
ztest_unit_test(test_arm_cmplx_conj_f16_16),
ztest_unit_test(test_arm_cmplx_conj_f16_23),
ztest_unit_test(test_arm_cmplx_dot_prod_f16_7),
ztest_unit_test(test_arm_cmplx_dot_prod_f16_16),
ztest_unit_test(test_arm_cmplx_dot_prod_f16_23),
ztest_unit_test(test_arm_cmplx_mag_f16_7),
ztest_unit_test(test_arm_cmplx_mag_f16_16),
ztest_unit_test(test_arm_cmplx_mag_f16_23),
ztest_unit_test(test_arm_cmplx_mag_squared_f16_7),
ztest_unit_test(test_arm_cmplx_mag_squared_f16_16),
ztest_unit_test(test_arm_cmplx_mag_squared_f16_23),
ztest_unit_test(test_arm_cmplx_mult_cmplx_f16_7),
ztest_unit_test(test_arm_cmplx_mult_cmplx_f16_16),
ztest_unit_test(test_arm_cmplx_mult_cmplx_f16_23),
ztest_unit_test(test_arm_cmplx_mult_real_f16_7),
ztest_unit_test(test_arm_cmplx_mult_real_f16_16),
ztest_unit_test(test_arm_cmplx_mult_real_f16_23)
);
ztest_run_test_suite(complexmath_f16);
}

View File

@ -0,0 +1,452 @@
static const uint16_t in_com1[512] = {
0xb21b, 0xadde, 0x2c99, 0x30b9, 0x3494, 0xb456, 0xb994, 0xb76a,
0x3239, 0xab76, 0x2f4f, 0x38aa, 0x3548, 0x344c, 0xb876, 0xb690,
0x345e, 0xb64c, 0xaf70, 0xb9c6, 0xb2d3, 0x2d58, 0xb5fc, 0x3257,
0xb660, 0xb87b, 0x2a39, 0x3916, 0xadd4, 0xb63e, 0x2caf, 0xb468,
0xb2cc, 0xba2d, 0xb184, 0x3804, 0x2f27, 0x3b23, 0x2a6b, 0xa9ca,
0xb587, 0xb393, 0x2c99, 0x36a7, 0x38cb, 0xa7bc, 0xae12, 0xa4c7,
0x34f9, 0xb328, 0xb86d, 0x1793, 0x2cbf, 0x2d2f, 0x34b3, 0x3970,
0xb908, 0x3858, 0x349c, 0xb509, 0x2094, 0xb480, 0x3051, 0x3382,
0xaa20, 0xb59e, 0x3ac9, 0x38e8, 0xb702, 0x3aa2, 0xb648, 0xb44f,
0x3570, 0x30ab, 0x25b0, 0x3558, 0x3500, 0xac42, 0xa0ce, 0x2fa3,
0xb81f, 0xb6b9, 0xb914, 0xadf7, 0xb3df, 0x3559, 0x34cd, 0xba25,
0xb624, 0x3016, 0x3283, 0x324f, 0x3764, 0x2cb4, 0xb5bb, 0xb4d1,
0xae15, 0xae9c, 0xaec9, 0x3635, 0xbc00, 0x2d46, 0xa9bf, 0xb065,
0xb1c1, 0x36cb, 0x3083, 0x3727, 0xa88c, 0x38de, 0x323e, 0xb834,
0xb4d9, 0x3471, 0xade5, 0xb192, 0xb269, 0x3122, 0xb427, 0x3597,
0xb0e3, 0x3495, 0xa03d, 0x35f2, 0x2cbf, 0x3295, 0xb171, 0x346d,
0xa67c, 0x2de5, 0xb441, 0xa8c1, 0x3625, 0x2eee, 0xb68b, 0xa885,
0x383b, 0xad4d, 0x34aa, 0x2cbb, 0x369c, 0xa681, 0x3429, 0xa9b4,
0x2fe9, 0xb21b, 0xb376, 0xacff, 0x36c6, 0xb060, 0x3782, 0x3023,
0x32a6, 0x353f, 0xab41, 0x34c7, 0xb4b1, 0x3026, 0x323f, 0x2f2f,
0x3436, 0x3a31, 0x341c, 0x367a, 0x3969, 0x3836, 0x30d7, 0x352a,
0x2c32, 0xaf80, 0xa6af, 0xb52c, 0x3625, 0xb6b7, 0xb12a, 0x3416,
0x2cea, 0xb2c0, 0x3546, 0x32eb, 0xb888, 0x2f3c, 0x32f2, 0xaff9,
0x306d, 0x381b, 0x366a, 0xb07d, 0xb927, 0xaf29, 0xad41, 0xb4e3,
0xa49f, 0x3344, 0xa3e4, 0xb1e0, 0xac79, 0xab63, 0xb405, 0xb638,
0xb4a5, 0xb1e9, 0xae50, 0x3330, 0x2c33, 0xacdb, 0xb725, 0xa80d,
0x323c, 0xb94f, 0xb584, 0x2f62, 0xb605, 0x343a, 0xb21c, 0x3834,
0x2c53, 0xae4a, 0xb88f, 0x3644, 0x3635, 0x3176, 0x2ce2, 0x2aaa,
0xa2f9, 0xa0c5, 0xad82, 0x3615, 0xae7c, 0xb4b4, 0xad52, 0x3804,
0xb6db, 0x3008, 0x3471, 0x2dd1, 0xafd2, 0x340a, 0x35d1, 0x2cfc,
0xadfd, 0xb2c4, 0xb5d6, 0x34b5, 0x241b, 0x2854, 0x31a9, 0x3735,
0x3601, 0x32ff, 0xaf71, 0xaf6c, 0xb6e8, 0xb650, 0xb108, 0xb2d3,
0xb565, 0x3102, 0x3942, 0xad39, 0xb47e, 0x37e0, 0xb7c1, 0x2ef5,
0xb4b7, 0x3709, 0xa5e0, 0x365b, 0x333b, 0x3733, 0x26d8, 0x30dc,
0xaaad, 0x36ec, 0x399f, 0x38fe, 0xb4b5, 0x31e8, 0xb1aa, 0x2e4a,
0x39c8, 0xb6af, 0x365e, 0xb56d, 0x35d1, 0xb662, 0xae32, 0xb60f,
0x324f, 0x31e6, 0x366c, 0x3580, 0x2fcd, 0xacad, 0xb4a1, 0x36ab,
0x2e50, 0x31d1, 0xb585, 0x39b8, 0xba51, 0x3462, 0x38a1, 0x356a,
0x2daf, 0x2c93, 0x2a5d, 0xb784, 0xb7d6, 0x34d2, 0xb1a0, 0xb9b1,
0xb865, 0x3308, 0x37f4, 0x334b, 0xb4b0, 0xa9e3, 0x2156, 0x342e,
0xb863, 0xb124, 0x32b7, 0xb868, 0x3a60, 0xb27c, 0x35a0, 0x2d5f,
0xa8b6, 0xb0c7, 0x3685, 0x3346, 0xb45f, 0xb488, 0x2c97, 0xb9bf,
0xa4e8, 0xad5f, 0x3549, 0xa6a0, 0x2e0e, 0xb8ea, 0xb4fe, 0xb694,
0xb9e4, 0xb35d, 0xb22f, 0x35f8, 0x35bd, 0xb323, 0x3458, 0x3274,
0x386e, 0x37fe, 0x30e7, 0x390f, 0x34ec, 0xb74f, 0x3663, 0xaeb2,
0xaf95, 0x3436, 0xb566, 0x2ec5, 0x2fe8, 0x3207, 0xa3d4, 0xb233,
0xa971, 0x385f, 0x3427, 0xb0e0, 0xb329, 0xb73a, 0x3575, 0xbbc0,
0x30c9, 0x3640, 0x2fdc, 0xb8ec, 0xb1b7, 0xb0ad, 0x309e, 0x2417,
0xb103, 0x359f, 0xb12a, 0xb343, 0xb557, 0x2caf, 0xb706, 0xae0e,
0xb0ad, 0xb1d4, 0xb2a0, 0x2e44, 0x3171, 0x3257, 0xb828, 0xb436,
0x3147, 0xb063, 0x31dd, 0x2c55, 0x352f, 0x3453, 0x3961, 0xbbff,
0x3811, 0xb746, 0x2e7b, 0x290a, 0xa195, 0x2ad5, 0x33fc, 0x2e91,
0x2ccf, 0x2f71, 0x349a, 0x3403, 0xb169, 0x30c2, 0x28eb, 0xb26a,
0xb03e, 0x340c, 0x3829, 0x299c, 0xb74e, 0xb7dd, 0x3202, 0xb893,
0x2d83, 0xad17, 0x329e, 0x3a38, 0xb75e, 0x33e2, 0x3738, 0x2c55,
0xb0a5, 0xb4ab, 0xa811, 0x294e, 0xb367, 0x3695, 0xb7a7, 0xb652,
0x308b, 0x2f77, 0xaed6, 0x38d4, 0xa879, 0xb5cd, 0xb67e, 0x353a,
0xb965, 0xb134, 0x3087, 0xa906, 0x3283, 0x3492, 0x3894, 0x1e73,
0xafdf, 0x2d08, 0xabcd, 0x3940, 0xab14, 0x3339, 0xad33, 0xb5b5,
0xb7f9, 0xb21b, 0xb5a6, 0x3755, 0x24bd, 0x314f, 0x31f0, 0xb661,
0xb242, 0xb615, 0x2d94, 0x3741, 0x3290, 0x32a9, 0xb50f, 0xb560,
0xb361, 0xb7e0, 0x30a8, 0x3692, 0xac99, 0xb33d, 0xb1b7, 0x351d,
0xb03a, 0xb0a8, 0xa322, 0xa4aa, 0x2b21, 0xb5ae, 0xb68d, 0x1e57,
0x2bcb, 0xb30b, 0x2d56, 0x2de6, 0xb608, 0x32ee, 0xb361, 0xb8b1
};
static const uint16_t in_com2[512] = {
0xb05d, 0x1918, 0x3114, 0xa9f1, 0xb6ef, 0xb528, 0xa568, 0xb414,
0xb094, 0xb613, 0xb385, 0x2160, 0xb721, 0x3506, 0xb0cf, 0x2958,
0xb539, 0xac71, 0x2746, 0xb0af, 0xa8d2, 0xb591, 0x3200, 0x39cc,
0x34d8, 0xb72f, 0x35d9, 0xa975, 0x315b, 0x37ad, 0xb3b3, 0xa436,
0x347e, 0x2f67, 0x3206, 0x3644, 0xab68, 0x378d, 0x35b4, 0xad2a,
0x3389, 0xb52d, 0x2f64, 0xad48, 0xb5e5, 0xb461, 0x339d, 0x34c3,
0x324f, 0xb0d6, 0xacc5, 0x3943, 0x3346, 0x3868, 0xa4bc, 0xb738,
0x2b88, 0x3230, 0x2f7e, 0x2f77, 0x3613, 0xb28f, 0x3062, 0x3433,
0x2981, 0xbb3b, 0x2d24, 0x3a0d, 0x2c2c, 0x35c2, 0x2891, 0x2e3a,
0x3283, 0x3622, 0x2e8b, 0xb45a, 0x3829, 0x31a0, 0x32e5, 0xabb7,
0xb4aa, 0x31cd, 0xb64f, 0xb28c, 0xb1f5, 0xb6ef, 0x3c00, 0xb472,
0xb86b, 0x30bb, 0x2293, 0xb97c, 0xb698, 0x376f, 0xadc1, 0x204a,
0x3ba8, 0xa912, 0xb55a, 0x35df, 0x2ddd, 0xafd8, 0xb46b, 0x13e0,
0x376f, 0xb624, 0xb5cc, 0x2dcc, 0x38c2, 0x8dba, 0x2217, 0xb6be,
0x30b8, 0xb9fe, 0x3990, 0xb577, 0xa9f1, 0xb57a, 0x2e9a, 0x3434,
0xb117, 0xb6f9, 0x34de, 0xa00f, 0xb4bb, 0xacee, 0x999b, 0xb460,
0xe81, 0xaf5e, 0xb3a7, 0xb66f, 0x3272, 0xac88, 0x3563, 0x321f,
0xb3e3, 0xb704, 0x37db, 0xa3b5, 0xacdb, 0xba25, 0x3675, 0xb8d9,
0x2b5e, 0xaa19, 0xb14f, 0x344a, 0x30fd, 0xb045, 0x36d7, 0xb038,
0x317b, 0x2a2f, 0xb267, 0xb57a, 0xa887, 0xb470, 0xa39e, 0x344c,
0x2af5, 0xb106, 0xa582, 0x22a8, 0xb426, 0x2a43, 0xb585, 0xb437,
0xa644, 0xaeba, 0xa81c, 0x2e84, 0xaa55, 0x3298, 0xad6b, 0x3418,
0xa895, 0x3960, 0x2a8c, 0x36e1, 0xb5d5, 0xb7cc, 0xb53c, 0x3446,
0x3614, 0x2bc0, 0xa85a, 0x3436, 0x322a, 0x397d, 0xb207, 0x3093,
0xafaa, 0xb539, 0xac69, 0xb734, 0x292b, 0x3647, 0xb88b, 0x2e0d,
0xae4b, 0xa86c, 0x3438, 0x2bc4, 0x2e06, 0x3851, 0xb8e8, 0x260e,
0xb748, 0xb04d, 0x2646, 0x2fd8, 0xa2ea, 0x2fd4, 0xafee, 0x35d8,
0xb041, 0x2a9d, 0x352c, 0xb282, 0x3269, 0xb654, 0x36e3, 0xb8de,
0x1a7e, 0xa33b, 0x31d0, 0x35de, 0xad3d, 0xb73d, 0x3149, 0xb705,
0xafb5, 0xb28f, 0xae92, 0x32ce, 0x3805, 0x358b, 0xb04d, 0x344c,
0xb334, 0x3620, 0x2c00, 0x2c9b, 0x3519, 0xb856, 0x2fcd, 0x3683,
0x2eac, 0xa96d, 0xa5ff, 0xb704, 0xa2ea, 0xb970, 0xaf0c, 0xb102,
0x28b3, 0xacb3, 0x2f70, 0x22bd, 0xac24, 0x290d, 0x9ecb, 0x3692,
0x3551, 0x3402, 0xad61, 0x37a7, 0xb689, 0x2e3e, 0x38e5, 0x3202,
0xb30f, 0xb5e5, 0xba16, 0xb8b0, 0xb9ce, 0xb390, 0xabb5, 0xb503,
0x2f98, 0x30c2, 0x2444, 0x3550, 0x33ed, 0x346c, 0x353b, 0xb7c6,
0x3430, 0xadc5, 0xac45, 0x33e4, 0x2fed, 0xb7c8, 0x336d, 0x2dac,
0x3123, 0xb059, 0x30ff, 0xb1d3, 0xaa30, 0x2c71, 0xb63c, 0x3855,
0x2bf9, 0x3819, 0xb67f, 0x38c2, 0x3403, 0x18e3, 0x2ce9, 0x3644,
0x2623, 0x3727, 0xb106, 0x33f9, 0xaf7b, 0x3135, 0x31a8, 0x3717,
0x3886, 0x2cd0, 0x3939, 0xa9b1, 0x345c, 0xb804, 0x2196, 0xb900,
0x3858, 0x3791, 0xb89b, 0x2d9e, 0xb10b, 0x36e7, 0x35af, 0xba06,
0xb3fc, 0x3651, 0x3ac9, 0xb835, 0xaf72, 0xb067, 0x3062, 0x29d1,
0x2f76, 0x3299, 0xb217, 0x201f, 0xae12, 0xb30d, 0xb86f, 0x2b32,
0x3b91, 0x267e, 0xb732, 0xb6d4, 0xb85e, 0xb3f4, 0x2b5d, 0x359f,
0xbb76, 0xb8c0, 0xb818, 0xa097, 0x3170, 0xadf5, 0x34bc, 0xb360,
0x3199, 0x2c9c, 0xb207, 0x3a85, 0xb6be, 0xb41d, 0x387d, 0x2f19,
0xb093, 0xb5c0, 0xb59d, 0x3603, 0x34e7, 0x1b5e, 0x2e03, 0x380f,
0xb698, 0x348f, 0xb7f0, 0xb7e6, 0xadc0, 0xa44c, 0x2b5f, 0x3418,
0x35ae, 0x34c6, 0xb465, 0x32ec, 0x3642, 0xb3ef, 0xa943, 0xad0e,
0x367a, 0xb233, 0x27d9, 0x2a43, 0x1217, 0x2e23, 0xacc0, 0xa63c,
0xb78a, 0xaf25, 0x9308, 0xae5b, 0xa8ee, 0x285c, 0x38b1, 0x3487,
0xa733, 0x348e, 0xb7dd, 0xb8ea, 0x33fa, 0x2984, 0x386f, 0x2b15,
0x3469, 0xb239, 0x30ce, 0x359e, 0xa4be, 0x3000, 0x2cfb, 0xa61c,
0xb98d, 0x33a3, 0x3891, 0x316c, 0x364a, 0x2ca1, 0xb4d3, 0xb8af,
0x2ff5, 0xb024, 0x303a, 0xa881, 0x39f0, 0x2ca0, 0xb8a8, 0x38f7,
0x34fa, 0x34be, 0x3853, 0xb511, 0x320d, 0xb5c9, 0x3056, 0xa414,
0xb69a, 0xb0f8, 0xb394, 0xb987, 0x2143, 0xb3ff, 0xadc6, 0xb885,
0xaa9d, 0xb879, 0xba8b, 0x34a5, 0x34ab, 0xb6fd, 0xb419, 0x32e7,
0xb4ff, 0x3027, 0xb7d4, 0x2f39, 0xb41c, 0xb343, 0x31d5, 0x3328,
0x3403, 0x2ccc, 0x334c, 0x327a, 0x2fe2, 0x38e2, 0xa768, 0xb4b7,
0xb659, 0x38ca, 0x3420, 0xb6ac, 0xa621, 0xb12a, 0x303f, 0xb4c4,
0xb7b6, 0xb554, 0xa493, 0x2910, 0x3767, 0x3052, 0x34a1, 0xb407,
0xb4a6, 0xb1af, 0x3511, 0x3304, 0xb5f7, 0x2ddd, 0xaf5b, 0xb77c
};
static const uint16_t in_com3[256] = {
0x38da, 0x2cae, 0xb082, 0xbb35, 0x30c1, 0xb431, 0xb85d, 0xb907,
0x37ee, 0x2c0b, 0xb16e, 0x30ac, 0x37f2, 0x3c00, 0x3038, 0x28ab,
0x36d7, 0xb837, 0xb0e9, 0xb1c5, 0x3228, 0x3846, 0xb098, 0xb60d,
0xb632, 0xb1d2, 0x3904, 0xba43, 0x334b, 0xbb5c, 0x275f, 0x9853,
0xb72b, 0x3427, 0xb48f, 0xb185, 0x34de, 0x302d, 0xb29e, 0x3625,
0x32ac, 0xae3e, 0x2fcc, 0xb8e5, 0xabfb, 0x38eb, 0x3706, 0x3245,
0x2d30, 0x2283, 0x3423, 0xb44d, 0xb1dc, 0x2d9b, 0xb6d7, 0x34d5,
0xb38e, 0x3206, 0xadb8, 0xb4b6, 0x380d, 0x3abb, 0x2ea9, 0x3492,
0xb9ce, 0x3933, 0x394f, 0xac07, 0xb634, 0x3841, 0x3471, 0x351b,
0x2ca4, 0x3919, 0xb512, 0x2815, 0xaefa, 0xb841, 0xaf75, 0x1d56,
0xb1b4, 0x2e2c, 0xadb5, 0xb235, 0xb518, 0xb065, 0x3535, 0xb69c,
0x9fb6, 0xa1e3, 0xb5bf, 0xb516, 0x24c1, 0xb5de, 0x3319, 0x36b8,
0xa93d, 0xb5ce, 0x378a, 0xae60, 0x3538, 0x34fa, 0x3101, 0xac65,
0xae24, 0xa326, 0x38dd, 0x2dfb, 0x3547, 0x2d6e, 0x39cf, 0x33f6,
0x38f6, 0x3145, 0x29dc, 0x343b, 0xb39e, 0x3311, 0x24c0, 0xab50,
0xb0f9, 0x28ee, 0x32ac, 0xae53, 0x26f3, 0xb555, 0xb6c7, 0x382b,
0x367f, 0xb751, 0x2dc2, 0xaedd, 0x2dbd, 0xb450, 0x30f6, 0x2628,
0x3310, 0x281a, 0xb889, 0x30ab, 0xae11, 0x351b, 0xade2, 0x36ac,
0x2e04, 0x3885, 0xb4c0, 0xb2b3, 0x343d, 0x2df7, 0x38fc, 0xad7e,
0x395d, 0x2828, 0x2f8e, 0xb44f, 0x32f7, 0x32d7, 0x3706, 0x33be,
0xb6cb, 0x35a3, 0x38b5, 0xb43d, 0x3544, 0x285a, 0xb6c5, 0xb8de,
0xb56c, 0x36b8, 0x326b, 0x3546, 0xb4b5, 0xbb2f, 0x3121, 0x3037,
0x329b, 0x2efe, 0xb5e0, 0x34ae, 0xb6a1, 0xb924, 0x33a1, 0x2dc9,
0xb81a, 0x34d2, 0xb778, 0x328a, 0xb358, 0xafac, 0x370b, 0x3933,
0x3025, 0x33b7, 0xb697, 0x334d, 0x3b8a, 0xb641, 0x31d9, 0x3354,
0x300b, 0x3334, 0xb2db, 0x3709, 0xb91b, 0xb957, 0xb5a7, 0x3545,
0xb858, 0xb243, 0x8d26, 0xb58a, 0xa920, 0x34f5, 0x32df, 0xb41a,
0x341a, 0x36c5, 0xac8a, 0xb688, 0x3424, 0x39f2, 0xb542, 0xb805,
0xb868, 0x3763, 0xae4b, 0xb550, 0x3804, 0xabc0, 0xb2ff, 0x329d,
0x3813, 0x354d, 0xb099, 0x2038, 0xb41b, 0xb0f4, 0xb8db, 0x298d,
0x36a9, 0x303f, 0x39bc, 0x3a9e, 0x2f06, 0x37b2, 0xb6cc, 0xb16e,
0xae23, 0x25a7, 0xb345, 0x361d, 0x350f, 0xa71d, 0x2ee7, 0xade1
};
static const uint16_t ref_conj[512] = {
0xb21b, 0x2dde, 0x2c99, 0xb0b9, 0x3494, 0x3456, 0xb994, 0x376a,
0x3239, 0x2b76, 0x2f4f, 0xb8aa, 0x3548, 0xb44c, 0xb876, 0x3690,
0x345e, 0x364c, 0xaf70, 0x39c6, 0xb2d3, 0xad58, 0xb5fc, 0xb257,
0xb660, 0x387b, 0x2a39, 0xb916, 0xadd4, 0x363e, 0x2caf, 0x3468,
0xb2cc, 0x3a2d, 0xb184, 0xb804, 0x2f27, 0xbb23, 0x2a6b, 0x29ca,
0xb587, 0x3393, 0x2c99, 0xb6a7, 0x38cb, 0x27bc, 0xae12, 0x24c7,
0x34f9, 0x3328, 0xb86d, 0x9793, 0x2cbf, 0xad2f, 0x34b3, 0xb970,
0xb908, 0xb858, 0x349c, 0x3509, 0x2094, 0x3480, 0x3051, 0xb382,
0xaa20, 0x359e, 0x3ac9, 0xb8e8, 0xb702, 0xbaa2, 0xb648, 0x344f,
0x3570, 0xb0ab, 0x25b0, 0xb558, 0x3500, 0x2c42, 0xa0ce, 0xafa3,
0xb81f, 0x36b9, 0xb914, 0x2df7, 0xb3df, 0xb559, 0x34cd, 0x3a25,
0xb624, 0xb016, 0x3283, 0xb24f, 0x3764, 0xacb4, 0xb5bb, 0x34d1,
0xae15, 0x2e9c, 0xaec9, 0xb635, 0xbc00, 0xad46, 0xa9bf, 0x3065,
0xb1c1, 0xb6cb, 0x3083, 0xb727, 0xa88c, 0xb8de, 0x323e, 0x3834,
0xb4d9, 0xb471, 0xade5, 0x3192, 0xb269, 0xb122, 0xb427, 0xb597,
0xb0e3, 0xb495, 0xa03d, 0xb5f2, 0x2cbf, 0xb295, 0xb171, 0xb46d,
0xa67c, 0xade5, 0xb441, 0x28c1, 0x3625, 0xaeee, 0xb68b, 0x2885,
0x383b, 0x2d4d, 0x34aa, 0xacbb, 0x369c, 0x2681, 0x3429, 0x29b4,
0x2fe9, 0x321b, 0xb376, 0x2cff, 0x36c6, 0x3060, 0x3782, 0xb023,
0x32a6, 0xb53f, 0xab41, 0xb4c7, 0xb4b1, 0xb026, 0x323f, 0xaf2f,
0x3436, 0xba31, 0x341c, 0xb67a, 0x3969, 0xb836, 0x30d7, 0xb52a,
0x2c32, 0x2f80, 0xa6af, 0x352c, 0x3625, 0x36b7, 0xb12a, 0xb416,
0x2cea, 0x32c0, 0x3546, 0xb2eb, 0xb888, 0xaf3c, 0x32f2, 0x2ff9,
0x306d, 0xb81b, 0x366a, 0x307d, 0xb927, 0x2f29, 0xad41, 0x34e3,
0xa49f, 0xb344, 0xa3e4, 0x31e0, 0xac79, 0x2b63, 0xb405, 0x3638,
0xb4a5, 0x31e9, 0xae50, 0xb330, 0x2c33, 0x2cdb, 0xb725, 0x280d,
0x323c, 0x394f, 0xb584, 0xaf62, 0xb605, 0xb43a, 0xb21c, 0xb834,
0x2c53, 0x2e4a, 0xb88f, 0xb644, 0x3635, 0xb176, 0x2ce2, 0xaaaa,
0xa2f9, 0x20c5, 0xad82, 0xb615, 0xae7c, 0x34b4, 0xad52, 0xb804,
0xb6db, 0xb008, 0x3471, 0xadd1, 0xafd2, 0xb40a, 0x35d1, 0xacfc,
0xadfd, 0x32c4, 0xb5d6, 0xb4b5, 0x241b, 0xa854, 0x31a9, 0xb735,
0x3601, 0xb2ff, 0xaf71, 0x2f6c, 0xb6e8, 0x3650, 0xb108, 0x32d3,
0xb565, 0xb102, 0x3942, 0x2d39, 0xb47e, 0xb7e0, 0xb7c1, 0xaef5,
0xb4b7, 0xb709, 0xa5e0, 0xb65b, 0x333b, 0xb733, 0x26d8, 0xb0dc,
0xaaad, 0xb6ec, 0x399f, 0xb8fe, 0xb4b5, 0xb1e8, 0xb1aa, 0xae4a,
0x39c8, 0x36af, 0x365e, 0x356d, 0x35d1, 0x3662, 0xae32, 0x360f,
0x324f, 0xb1e6, 0x366c, 0xb580, 0x2fcd, 0x2cad, 0xb4a1, 0xb6ab,
0x2e50, 0xb1d1, 0xb585, 0xb9b8, 0xba51, 0xb462, 0x38a1, 0xb56a,
0x2daf, 0xac93, 0x2a5d, 0x3784, 0xb7d6, 0xb4d2, 0xb1a0, 0x39b1,
0xb865, 0xb308, 0x37f4, 0xb34b, 0xb4b0, 0x29e3, 0x2156, 0xb42e,
0xb863, 0x3124, 0x32b7, 0x3868, 0x3a60, 0x327c, 0x35a0, 0xad5f,
0xa8b6, 0x30c7, 0x3685, 0xb346, 0xb45f, 0x3488, 0x2c97, 0x39bf,
0xa4e8, 0x2d5f, 0x3549, 0x26a0, 0x2e0e, 0x38ea, 0xb4fe, 0x3694,
0xb9e4, 0x335d, 0xb22f, 0xb5f8, 0x35bd, 0x3323, 0x3458, 0xb274,
0x386e, 0xb7fe, 0x30e7, 0xb90f, 0x34ec, 0x374f, 0x3663, 0x2eb2,
0xaf95, 0xb436, 0xb566, 0xaec5, 0x2fe8, 0xb207, 0xa3d4, 0x3233,
0xa971, 0xb85f, 0x3427, 0x30e0, 0xb329, 0x373a, 0x3575, 0x3bc0,
0x30c9, 0xb640, 0x2fdc, 0x38ec, 0xb1b7, 0x30ad, 0x309e, 0xa417,
0xb103, 0xb59f, 0xb12a, 0x3343, 0xb557, 0xacaf, 0xb706, 0x2e0e,
0xb0ad, 0x31d4, 0xb2a0, 0xae44, 0x3171, 0xb257, 0xb828, 0x3436,
0x3147, 0x3063, 0x31dd, 0xac55, 0x352f, 0xb453, 0x3961, 0x3bff,
0x3811, 0x3746, 0x2e7b, 0xa90a, 0xa195, 0xaad5, 0x33fc, 0xae91,
0x2ccf, 0xaf71, 0x349a, 0xb403, 0xb169, 0xb0c2, 0x28eb, 0x326a,
0xb03e, 0xb40c, 0x3829, 0xa99c, 0xb74e, 0x37dd, 0x3202, 0x3893,
0x2d83, 0x2d17, 0x329e, 0xba38, 0xb75e, 0xb3e2, 0x3738, 0xac55,
0xb0a5, 0x34ab, 0xa811, 0xa94e, 0xb367, 0xb695, 0xb7a7, 0x3652,
0x308b, 0xaf77, 0xaed6, 0xb8d4, 0xa879, 0x35cd, 0xb67e, 0xb53a,
0xb965, 0x3134, 0x3087, 0x2906, 0x3283, 0xb492, 0x3894, 0x9e73,
0xafdf, 0xad08, 0xabcd, 0xb940, 0xab14, 0xb339, 0xad33, 0x35b5,
0xb7f9, 0x321b, 0xb5a6, 0xb755, 0x24bd, 0xb14f, 0x31f0, 0x3661,
0xb242, 0x3615, 0x2d94, 0xb741, 0x3290, 0xb2a9, 0xb50f, 0x3560,
0xb361, 0x37e0, 0x30a8, 0xb692, 0xac99, 0x333d, 0xb1b7, 0xb51d,
0xb03a, 0x30a8, 0xa322, 0x24aa, 0x2b21, 0x35ae, 0xb68d, 0x9e57,
0x2bcb, 0x330b, 0x2d56, 0xade6, 0xb608, 0xb2ee, 0xb361, 0x38b1
};
static const uint16_t ref_dot_prod_3[2] = {
0xb8ad, 0x270b
};
static const uint16_t ref_dot_prod_4n[2] = {
0xbc41, 0x328c
};
static const uint16_t ref_dot_prod_4n1[2] = {
0xc00a, 0xad5b
};
static const uint16_t ref_mag[256] = {
0x32c6, 0x3141, 0x364e, 0x3ab2, 0x327f, 0x38c1, 0x36cf, 0x398a,
0x37aa, 0x39d9, 0x3354, 0x36c6, 0x3980, 0x391a, 0x3669, 0x348f,
0x3a68, 0x383f, 0x3b31, 0x2c53, 0x36b3, 0x36c1, 0x38cd, 0x2e30,
0x3620, 0x386d, 0x2f07, 0x39ed, 0x3aa6, 0x36d3, 0x3480, 0x3455,
0x35ab, 0x3c30, 0x3b81, 0x379e, 0x35eb, 0x355b, 0x351d, 0x2fa9,
0x3952, 0x3922, 0x36a4, 0x3a98, 0x3679, 0x3489, 0x377c, 0x377c,
0x307e, 0x3670, 0x3c03, 0x30a0, 0x3760, 0x377f, 0x38e0, 0x387c,
0x3693, 0x324d, 0x341b, 0x36f6, 0x3531, 0x35f2, 0x32ff, 0x3532,
0x2e1d, 0x344c, 0x3662, 0x3692, 0x3848, 0x34cf, 0x36a0, 0x3439,
0x3347, 0x33de, 0x371e, 0x37ca, 0x3636, 0x34dd, 0x3521, 0x3335,
0x3a8a, 0x37ac, 0x3adb, 0x35b4, 0x304c, 0x3530, 0x388d, 0x34d5,
0x332f, 0x364f, 0x389f, 0x3401, 0x3841, 0x36cc, 0x393a, 0x350f,
0x334a, 0x31e5, 0x2dcd, 0x3767, 0x3582, 0x33da, 0x2e6b, 0x372a,
0x3988, 0x35d1, 0x375b, 0x3879, 0x2fa1, 0x3988, 0x36c8, 0x2dea,
0x243a, 0x363d, 0x34fa, 0x3812, 0x3726, 0x34ac, 0x347d, 0x35f2,
0x3366, 0x377f, 0x28ca, 0x37be, 0x36f3, 0x3141, 0x38ae, 0x343d,
0x35f2, 0x394c, 0x3889, 0x37f3, 0x383c, 0x365e, 0x3807, 0x30ef,
0x36f9, 0x3b84, 0x358e, 0x327a, 0x3aad, 0x382f, 0x3851, 0x3641,
0x3452, 0x383a, 0x308c, 0x380f, 0x329e, 0x3a5a, 0x3aaf, 0x395d,
0x2f4c, 0x378f, 0x389a, 0x39dd, 0x38bc, 0x3860, 0x34bf, 0x342f,
0x3892, 0x38b7, 0x3a94, 0x35c8, 0x30eb, 0x3778, 0x364c, 0x39c6,
0x2d82, 0x354d, 0x38f9, 0x3821, 0x3a2c, 0x36b9, 0x36c2, 0x356a,
0x39f8, 0x3934, 0x3868, 0x369a, 0x349e, 0x35a8, 0x3335, 0x3238,
0x3862, 0x34d1, 0x3808, 0x3c1c, 0x36b2, 0x3905, 0x3363, 0x30a5,
0x3627, 0x3475, 0x3578, 0x372f, 0x3379, 0x3354, 0x342e, 0x38a9,
0x32dd, 0x3240, 0x36c1, 0x3cd2, 0x3974, 0x2ef4, 0x2af9, 0x3451,
0x306e, 0x361b, 0x3334, 0x3288, 0x3492, 0x382d, 0x395e, 0x38d1,
0x2f81, 0x3a6f, 0x382d, 0x374d, 0x3537, 0x2aaf, 0x378d, 0x38f6,
0x31e1, 0x38e7, 0x35d3, 0x382b, 0x398d, 0x30b2, 0x359d, 0x3894,
0x30ac, 0x3946, 0x3370, 0x35db, 0x3845, 0x38a1, 0x3157, 0x3709,
0x36d7, 0x3763, 0x34ad, 0x3762, 0x3859, 0x36f8, 0x3398, 0x35db,
0x324a, 0x25df, 0x35c0, 0x368d, 0x334f, 0x2ff4, 0x36f5, 0x390a
};
static const uint16_t ref_mag_squared[256] = {
0x29bc, 0x26e7, 0x30f8, 0x399b, 0x2947, 0x35a7, 0x31cb, 0x37ab,
0x3357, 0x3847, 0x2ab6, 0x31bc, 0x3790, 0x3682, 0x3122, 0x2d32,
0x3921, 0x3483, 0x3a77, 0x1cac, 0x319c, 0x31b3, 0x35c3, 0x20c8,
0x30b1, 0x34e6, 0x222c, 0x3863, 0x3986, 0x31d3, 0x2d11, 0x2cb0,
0x3004, 0x3c62, 0x3b09, 0x3341, 0x3061, 0x2f2d, 0x2e88, 0x2355,
0x3713, 0x3695, 0x3183, 0x3970, 0x313d, 0x2d24, 0x3300, 0x3301,
0x250b, 0x312e, 0x3c07, 0x2558, 0x32cd, 0x3307, 0x35f0, 0x3507,
0x3167, 0x28f7, 0x2c37, 0x320f, 0x2ebd, 0x306b, 0x2a1f, 0x2ebe,
0x20ac, 0x2c9d, 0x3118, 0x3165, 0x3496, 0x2dc9, 0x317c, 0x2c75,
0x2a9e, 0x2bbd, 0x3256, 0x3395, 0x30d2, 0x2de9, 0x2e95, 0x2a7d,
0x3958, 0x335b, 0x39e0, 0x3010, 0x249e, 0x2ebb, 0x352d, 0x2dd7,
0x2a73, 0x30f9, 0x3556, 0x2c02, 0x3486, 0x31c6, 0x36d5, 0x2e66,
0x2aa4, 0x2858, 0x2035, 0x32da, 0x2f94, 0x2bb4, 0x2127, 0x326a,
0x37a7, 0x303a, 0x32c2, 0x3501, 0x2347, 0x37a6, 0x31c0, 0x205f,
0xc76, 0x30dd, 0x2e30, 0x3423, 0x3263, 0x2d75, 0x2d09, 0x306c,
0x2ad7, 0x3307, 0x15bc, 0x337e, 0x3209, 0x26e7, 0x3579, 0x2c7f,
0x306b, 0x3703, 0x3523, 0x33e5, 0x347c, 0x3111, 0x340e, 0x2615,
0x3214, 0x3b10, 0x2fb8, 0x293f, 0x3993, 0x3460, 0x34a9, 0x30e3,
0x2caa, 0x3478, 0x252c, 0x341e, 0x2979, 0x390b, 0x3996, 0x3730,
0x22a7, 0x3325, 0x354b, 0x384c, 0x359b, 0x34c9, 0x2da1, 0x2c60,
0x3539, 0x358e, 0x3969, 0x302e, 0x260d, 0x32f8, 0x30f4, 0x382b,
0x1f96, 0x2f07, 0x362f, 0x3444, 0x38c3, 0x31a7, 0x31b5, 0x2f53,
0x3873, 0x36c5, 0x34da, 0x3172, 0x2d54, 0x3000, 0x2a7f, 0x28d5,
0x34ce, 0x2dcc, 0x3411, 0x3c38, 0x319a, 0x364b, 0x2ad1, 0x2565,
0x30bc, 0x2cf6, 0x2f7a, 0x3273, 0x2afb, 0x2ab7, 0x2c5d, 0x356d,
0x29e3, 0x28e2, 0x31b3, 0x3dce, 0x3770, 0x220b, 0x1a14, 0x2ca9,
0x24e8, 0x30a8, 0x2a7d, 0x2955, 0x2d39, 0x345c, 0x3733, 0x35cc,
0x230a, 0x392d, 0x345d, 0x32aa, 0x2ecc, 0x1995, 0x3320, 0x3628,
0x2852, 0x3601, 0x303e, 0x3457, 0x37b4, 0x2584, 0x2fdf, 0x353e,
0x2574, 0x36f4, 0x2aea, 0x3049, 0x348e, 0x355b, 0x2722, 0x3230,
0x31d9, 0x32d3, 0x2d77, 0x32cf, 0x34ba, 0x3212, 0x2b36, 0x304a,
0x28f1, 0x104f, 0x3021, 0x315e, 0x2aad, 0x23e9, 0x320c, 0x365a
};
static const uint16_t ref_mult_cmplx[512] = {
0x26b7, 0x2228, 0x24ac, 0x2524, 0xb2c3, 0x267c, 0xae9d, 0x31ff,
0xaa65, 0xac31, 0xa838, 0xb059, 0xb367, 0xa415, 0x2e75, 0x28e8,
0xaf73, 0x2f01, 0xaefa, 0x9b2c, 0x28bf, 0x2c8c, 0xb2d7, 0xb37c,
0xb5f4, 0x20bc, 0x29bf, 0x335f, 0x3180, 0xaefa, 0xa5aa, 0x2c29,
0x2798, 0xb3b9, 0xb355, 0x26ec, 0xb6d6, 0x1486, 0x234a, 0xa52a,
0xb10e, 0x2b2c, 0x2974, 0x2963, 0xb355, 0xb0e5, 0xa45b, 0xa82e,
0x2707, 0xadd4, 0x291f, 0xb5d3, 0xa71c, 0x2b96, 0x34d2, 0xb0a5,
0xb08b, 0xadbd, 0x2c82, 0x9a96, 0xaaf1, 0xaef4, 0xa984, 0x2c53,
0xb51c, 0x2735, 0xb655, 0x3987, 0xb53b, 0xaea1, 0x223e, 0xaa1e,
0x22cb, 0x311f, 0x2df6, 0x2732, 0x3193, 0x2535, 0x1d4b, 0x26ba,
0x333f, 0x2777, 0x3366, 0x3155, 0x321a, 0x29ae, 0x2d8b, 0xbacf,
0x322f, 0xb013, 0x3069, 0xb062, 0xb32f, 0x31e6, 0x2872, 0x2628,
0xae15, 0xae16, 0xaed9, 0xb166, 0xad37, 0x302a, 0x226a, 0x28d9,
0x2d15, 0x3443, 0xaddc, 0xb0c6, 0xa55b, 0x35ca, 0xb303, 0xada9,
0x3139, 0x3449, 0xafe7, 0xadbb, 0x2c1c, 0x2bd2, 0xaf97, 0xa81f,
0x30c5, 0x2560, 0xefd, 0x2f3d, 0x9e3a, 0xac42, 0x2cdf, 0x29da,
0x216d, 0x1a0c, 0x2a3a, 0x2f69, 0x2d71, 0x9d84, 0xb031, 0xadc5,
0xb155, 0xb2c4, 0x309d, 0x2815, 0xaa82, 0xb50c, 0x2cfe, 0xb19e,
0x980c, 0xa452, 0x2ba1, 0xaa58, 0x2a1c, 0xacfb, 0x32f7, 0x9ece,
0x250f, 0x2c3c, 0x2f44, 0xa92a, 0x29ee, 0x2ce9, 0xa83b, 0x2a7f,
0x3059, 0x11c8, 0xa186, 0x9d80, 0xb26f, 0xae9e, 0x2833, 0xb0d6,
0xa321, 0x9c1f, 0x2852, 0x1fe7, 0x2c51, 0x2e64, 0xaa9d, 0xac07,
0x3073, 0x2b92, 0xacdf, 0x30e4, 0x342f, 0x3383, 0xa8d5, 0x2e52,
0x257c, 0x3282, 0x25f7, 0x2f10, 0xaa0d, 0xb76a, 0x2b91, 0x29dc,
0x2ce2, 0xa574, 0xad39, 0x2504, 0x2513, 0xa79e, 0x31be, 0x324d,
0x25ac, 0x2737, 0xa913, 0x2ad1, 0x2a08, 0x273b, 0x3465, 0x2088,
0xb1b1, 0x3469, 0xa5c8, 0xa90c, 0xa6f8, 0xaa58, 0xb162, 0xb051,
0x9bfe, 0x243d, 0xaeb0, 0x33c2, 0x30a6, 0xafa3, 0x2c21, 0xa627,
0x89ba, 0x955, 0xb0f7, 0x28cd, 0xaffb, 0x2c79, 0x329b, 0x2fa4,
0x2cf5, 0x2ca7, 0xaa1f, 0x2a5c, 0xb0c3, 0x2d69, 0xac77, 0x2d94,
0x2e87, 0x2205, 0xa9a0, 0xa005, 0x2600, 0x183e, 0xb12d, 0x3010,
0x2a31, 0x1f0d, 0xaa29, 0x2adf, 0xb432, 0x34c7, 0xa41d, 0x2a28,
0x9349, 0x27ce, 0x2cf4, 0x92cd, 0x9521, 0xa97f, 0xa94e, 0xb265,
0xb2a9, 0x2ca1, 0xb204, 0xa9ae, 0xb05c, 0xb12d, 0xa237, 0x2e44,
0x3178, 0xace1, 0xb168, 0xbb17, 0x341d, 0xac1f, 0x294e, 0x2a57,
0x30bb, 0x2b6a, 0x2fa1, 0x300c, 0x3269, 0x16b1, 0xb2e6, 0xacea,
0x2c5e, 0x27ce, 0xaf24, 0x2cde, 0xa53d, 0xac60, 0xaea9, 0x2c8c,
0x2930, 0x240a, 0x2ce2, 0x3195, 0x24e6, 0xac5b, 0xb68a, 0x31ce,
0xa7f5, 0x2a65, 0x3425, 0x330d, 0xafe8, 0x2cc3, 0x343e, 0xafe6,
0xaf22, 0xb3b1, 0xb050, 0x2da3, 0x2957, 0xa969, 0xaf4a, 0x2a80,
0xb4c4, 0xb03a, 0x2f33, 0xb5e7, 0x2f65, 0xb748, 0x2b34, 0xb300,
0x2a7b, 0xae4d, 0xb413, 0xae16, 0x3149, 0xacb1, 0xb81f, 0xb4f2,
0x28da, 0x22d8, 0x3444, 0xb243, 0xae1d, 0x2b7c, 0xa628, 0xac83,
0xa8ea, 0xb1b8, 0x2852, 0xaca5, 0xad52, 0xab68, 0xb12e, 0xae2e,
0x3817, 0x37c9, 0x326d, 0xb598, 0xb481, 0x3189, 0x2ba4, 0x304b,
0x3445, 0xb19a, 0x318e, 0xaa8c, 0x28ee, 0x253f, 0xaa4b, 0xaae3,
0xa9fd, 0x2dec, 0x2cd1, 0x33b0, 0xa599, 0x33ef, 0x34c8, 0xb80c,
0x2f9e, 0xaf03, 0x3205, 0x3431, 0xaaf1, 0xa9d0, 0x1d93, 0x2cc8,
0xa88c, 0xb210, 0xa818, 0x3227, 0x27fe, 0x93ed, 0x945e, 0xaf89,
0x18fa, 0xaeee, 0x2892, 0xac96, 0x2f67, 0x2885, 0x1081, 0x2aa3,
0x2925, 0xad98, 0x18b8, 0x21a6, 0xa693, 0x2801, 0xacc0, 0x2b66,
0xb4a5, 0x310a, 0x1bd5, 0xa12a, 0x95ba, 0x98f9, 0x2f82, 0x302f,
0xa882, 0x24a4, 0x227e, 0xb4cc, 0xaa37, 0x279f, 0x2825, 0xaef9,
0x2279, 0x2e1d, 0x2c04, 0x320e, 0x2c79, 0xaa24, 0x13ed, 0xaa45,
0xa939, 0x2cd9, 0xa2ff, 0x37a8, 0xb25d, 0x2c11, 0xae2c, 0xb48e,
0xab24, 0xa47b, 0x999b, 0x1ebf, 0xb272, 0x349e, 0x3830, 0xac47,
0x20e5, 0x2d04, 0x3044, 0x35c2, 0xb068, 0xab28, 0xaa5f, 0x2a7f,
0x340d, 0x317f, 0xabc2, 0xada8, 0x2cb4, 0xaa21, 0xaa28, 0xb52f,
0x2a70, 0x2c24, 0xb080, 0xb870, 0x2d47, 0x2dc3, 0x2e42, 0x2cba,
0x31c6, 0x9d38, 0x2fbe, 0xb43a, 0x2836, 0xa9fe, 0x2fdf, 0xa7f8,
0xa543, 0xaf0a, 0xac9a, 0x2fbf, 0xae83, 0x30d3, 0xadc0, 0x2e96,
0x362d, 0x2b53, 0x32ae, 0x29c9, 0xa874, 0x245b, 0x2c94, 0x2e1e,
0x23c7, 0x2f4d, 0x13f1, 0x8b64, 0x2cb8, 0xb104, 0xaf7a, 0x2eb7,
0xab45, 0x2acd, 0x1e55, 0x2a13, 0x2fba, 0xaf60, 0xb3ed, 0x319b
};
static const uint16_t ref_mult_real[512] = {
0xaf67, 0xab1d, 0x1d61, 0x2187, 0xa928, 0x28e3, 0x3906, 0x36ae,
0x2766, 0xa06f, 0xa7a8, 0xb0e3, 0xb1c2, 0xb0af, 0x359b, 0x3420,
0x3054, 0xb23d, 0x9f84, 0xa9d6, 0x28a1, 0xa341, 0xaafd, 0x2767,
0xb255, 0xb474, 0x2a39, 0x3916, 0xa225, 0xaa95, 0x1977, 0xa124,
0xadcf, 0xb548, 0x2dd0, 0xb43c, 0xa463, 0xb061, 0xa0a1, 0x202d,
0xac41, 0xa9d4, 0x28ea, 0x331c, 0xad82, 0x1c71, 0x2897, 0x1f39,
0xafb3, 0x2d8b, 0x2e72, 0x8d83, 0x29f3, 0x2a80, 0xb35b, 0xb842,
0xb096, 0x2feb, 0xb43e, 0x34a2, 0xc38, 0xa025, 0x8cab, 0x900f,
0x257d, 0x3108, 0x330c, 0x3119, 0x2ffd, 0xb38f, 0x2c55, 0x29f2,
0x2e9f, 0x29af, 0x19f0, 0x2995, 0xac23, 0x230b, 0x9b62, 0x29dd,
0xaee0, 0xad9b, 0x2bed, 0x20a8, 0xa7ac, 0x2936, 0xb1e0, 0x3785,
0x2620, 0xa013, 0x3001, 0x2fc2, 0x327d, 0x2821, 0xac7e, 0xab8c,
0x9fe4, 0xa049, 0x9586, 0x1d0e, 0xb423, 0x2575, 0x222e, 0x28ba,
0x2837, 0xacf9, 0x2253, 0x2903, 0x23c6, 0xb429, 0x2b8a, 0xb114,
0x2c94, 0xac32, 0xa470, 0xa832, 0x2495, 0xa357, 0x2ce4, 0xae95,
0xacf2, 0x30a4, 0x9f21, 0x3500, 0x1fe6, 0x257b, 0xaa37, 0x2d0e,
0x24b5, 0xac47, 0xb187, 0xa62e, 0x3414, 0x2c99, 0x2697, 0x188d,
0xb290, 0x281c, 0x30f6, 0x2908, 0x2f58, 0x9f3a, 0x2d50, 0xa347,
0x2097, 0xa316, 0xb0c2, 0xaa5e, 0xb04b, 0x298b, 0x23a9, 0x1c38,
0xa5cd, 0xa893, 0x27b6, 0xb114, 0x2860, 0xa3bc, 0x142a, 0x10ca,
0xaa02, 0xb06a, 0x2657, 0x28ff, 0xabb8, 0xaa02, 0xa783, 0xac01,
0xa558, 0x28c7, 0x1b58, 0x29af, 0x2fff, 0xb05e, 0x2c44, 0xaec0,
0x90bc, 0x1682, 0x9bc3, 0x9917, 0x3282, 0xa932, 0xac6b, 0x2912,
0x1942, 0x20e1, 0xb0b4, 0x2a95, 0xb092, 0xa65a, 0xa86a, 0xb01b,
0x120d, 0xa0c2, 0x1dba, 0x2c43, 0xa837, 0xa6f6, 0x2669, 0x28f4,
0xae0f, 0xabb5, 0xa7db, 0x2c79, 0x2141, 0xa214, 0x27d9, 0x1873,
0xa4c9, 0x2c13, 0x1ced, 0x9699, 0xb351, 0x3123, 0xa491, 0x2a49,
0x25b5, 0xa826, 0xaa30, 0x2841, 0x3482, 0x2fee, 0x24dc, 0x22a2,
0xa053, 0x9deb, 0xa342, 0x2c02, 0x9cbf, 0xa2e4, 0xa5a1, 0x303f,
0x2e88, 0xa7ae, 0x2bd9, 0x2524, 0x98a4, 0x1ccc, 0xa551, 0x9c8f,
0x2371, 0x2834, 0xa332, 0x21cd, 0x1ada, 0x1f38, 0xa47a, 0xa9b2,
0x2137, 0x1e14, 0x28f5, 0x28f2, 0x31da, 0x3159, 0xad3f, 0xaf1e,
0xb061, 0x2c11, 0xb4cf, 0x28c7, 0xa677, 0x29ab, 0x2aa7, 0xa1f8,
0xa6c4, 0x290c, 0x1e55, 0xaeda, 0x287c, 0x2c77, 0x1144, 0x1b7a,
0xa1e5, 0x2e1d, 0x25c3, 0x251e, 0x3157, 0xaeb2, 0xa69c, 0x2357,
0xac62, 0x2911, 0x3010, 0xaeec, 0xa847, 0x28b1, 0xa92b, 0xb10d,
0x24be, 0x246f, 0x3341, 0x3237, 0xa8a2, 0x258e, 0x2bc1, 0xad95,
0x26b1, 0x2a2a, 0xa81e, 0x2c44, 0xb7de, 0x3176, 0xaa5a, 0xa76f,
0x2b9f, 0x2a22, 0x169d, 0xa3cf, 0xab66, 0x288d, 0x2a0f, 0x3221,
0xafa7, 0x2a1f, 0x2ecc, 0x2a3c, 0xb01e, 0xa52c, 0x192a, 0x2c0b,
0x3372, 0x2c5e, 0x2cbb, 0xb235, 0x3781, 0xafa2, 0xadf5, 0xa5b1,
0xa234, 0xaa4a, 0x2318, 0x1fea, 0x2f66, 0x2faa, 0xa995, 0x36fe,
0x1ea7, 0x2748, 0x3071, 0xa190, 0x24db, 0xafe3, 0xae95, 0xb056,
0x32ef, 0x2c55, 0x318d, 0xb55c, 0x2b5a, 0xa893, 0x2895, 0x26ce,
0x2f51, 0x2e99, 0x2449, 0x2c6b, 0xaf3b, 0x315e, 0x2f78, 0xa7d5,
0x2a49, 0xaefb, 0x32ef, 0xac5a, 0x278a, 0x29bf, 0x95a9, 0xa47b,
0x2595, 0xb47b, 0x2d02, 0xa9e0, 0x2eb0, 0x32c0, 0x2c75, 0xb255,
0xa865, 0xadbd, 0xa389, 0x2cb8, 0xad09, 0xac1e, 0x2e01, 0x2151,
0xa531, 0x29d2, 0xa8fb, 0xab00, 0x3067, 0xa7b7, 0xae68, 0xa586,
0xb068, 0xb17e, 0x2d2e, 0xa8e6, 0x27f5, 0x28a3, 0xaf9d, 0xabb7,
0x2556, 0xa46f, 0x2947, 0x23ce, 0xac72, 0xab6a, 0x34bb, 0xb708,
0xb530, 0x34a4, 0xac53, 0xa6ba, 0x1be3, 0xa4d4, 0x2d43, 0x2854,
0xa939, 0xac0b, 0xab34, 0xaa48, 0x37b, 0x8310, 0xa2d1, 0x2c72,
0x1d70, 0xa12f, 0x3128, 0x22f4, 0xae46, 0xaec0, 0xaa29, 0x30b0,
0x25a7, 0xa538, 0x2d9a, 0x3543, 0x282d, 0xa478, 0xb1e5, 0xa713,
0xa8cf, 0xacd5, 0xa60b, 0x27e2, 0x2cdd, 0xb053, 0x33b1, 0x325a,
0xad01, 0xac1d, 0xaa4f, 0x3475, 0x1b09, 0x2890, 0x304f, 0xaef1,
0xb56b, 0xad39, 0xa062, 0x18de, 0xa9b1, 0xabff, 0x2f92, 0x1554,
0xac02, 0x2920, 0xa52b, 0x32f5, 0x2012, 0xa827, 0x917b, 0x9a05,
0x3017, 0x2a44, 0x2aff, 0xac8b, 0xa1c0, 0xae71, 0x201e, 0xa46d,
0xad36, 0xb110, 0x21ec, 0x2bb4, 0x30b4, 0x30c6, 0xb430, 0xb472,
0xa67b, 0xaaea, 0x2c7b, 0x3252, 0x27d0, 0x2e26, 0x27c2, 0xaaf1,
0x227c, 0x2325, 0x8d0a, 0x8e97, 0xa27b, 0x2d29, 0xb101, 0x18d8,
0x24ee, 0xac74, 0x98be, 0x993f, 0xa935, 0x25fa, 0x256c, 0x2ae4
};

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020 Stephanos Ioannidis <root@stephanos.io>
* Copyright (c) 2021 Stephanos Ioannidis <root@stephanos.io>
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -9,11 +9,15 @@
extern void test_complexmath_q15(void);
extern void test_complexmath_q31(void);
extern void test_complexmath_f16(void);
extern void test_complexmath_f32(void);
void test_main(void)
{
test_complexmath_q15();
test_complexmath_q31();
#ifdef CONFIG_CMSIS_DSP_FLOAT16
test_complexmath_f16();
#endif
test_complexmath_f32();
}