Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/cmsis-dsp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ if(CONFIG_CMSIS_DSP)
${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_selection_sort_f32.c
${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_sort_f32.c
${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_sort_init_f32.c
${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_weighted_sum_f32.c
${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_weighted_average_f32.c
)

if ((NOT ARMAC5) AND (NOT DISABLEFLOAT16))
Expand All @@ -740,7 +740,7 @@ if(CONFIG_CMSIS_DSP)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_q15_to_f16.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_float_to_f16.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_f16_to_float.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_weighted_sum_f16.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_weighted_average_f16.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_barycenter_f16.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_f16_to_f64.c)
zephyr_library_sources(${CMSIS_DSP_DIR}/Source/SupportFunctions/arm_f64_to_f16.c)
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/cmsis_dsp/fastmath/src/q15.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@
status = arm_sqrt_q15(in_sqrt[index], &output[index]);

/* Validate operation status */
if (in_sqrt[index] <= 0) {
if (in_sqrt[index] < 0) {
zassert_equal(status, ARM_MATH_ARGUMENT_ERROR,
"square root did fail with an input value "
"of '0'");
"of less than '0'");
} else {

Check notice on line 97 in tests/lib/cmsis_dsp/fastmath/src/q15.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

tests/lib/cmsis_dsp/fastmath/src/q15.c:97 - "square root did fail with an input value " - "of less than '0'"); + "square root did fail with an input value " + "of less than '0'");

Check notice on line 97 in tests/lib/cmsis_dsp/fastmath/src/q15.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

tests/lib/cmsis_dsp/fastmath/src/q15.c:97 - "square root did fail with an input value " - "of less than '0'"); + "square root did fail with an input value " + "of less than '0'");
zassert_equal(status, ARM_MATH_SUCCESS,
"square root operation did not succeed");
}
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/cmsis_dsp/fastmath/src/q31.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@
status = arm_sqrt_q31(in_sqrt[index], &output[index]);

/* Validate operation status */
if (in_sqrt[index] <= 0) {
if (in_sqrt[index] < 0) {
zassert_equal(status, ARM_MATH_ARGUMENT_ERROR,
"square root did fail with an input value "
"of '0'");
"of less than '0'");
} else {

Check notice on line 97 in tests/lib/cmsis_dsp/fastmath/src/q31.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

tests/lib/cmsis_dsp/fastmath/src/q31.c:97 - "square root did fail with an input value " - "of less than '0'"); + "square root did fail with an input value " + "of less than '0'");

Check notice on line 97 in tests/lib/cmsis_dsp/fastmath/src/q31.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

tests/lib/cmsis_dsp/fastmath/src/q31.c:97 - "square root did fail with an input value " - "of less than '0'"); + "square root did fail with an input value " + "of less than '0'");
zassert_equal(status, ARM_MATH_SUCCESS,
"square root operation did not succeed");
}
Expand Down
10 changes: 5 additions & 5 deletions tests/lib/cmsis_dsp/support/src/f16.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@
DEFINE_TEST_VARIANT3(support_f16, arm_float_to_f16, 16, ref_f32, ref_f16, 16);
DEFINE_TEST_VARIANT3(support_f16, arm_float_to_f16, 23, ref_f32, ref_f16, 23);

static void test_arm_weighted_sum_f16(
static void test_arm_weighted_average_f16(
int ref_offset, size_t length)
{

Check notice on line 187 in tests/lib/cmsis_dsp/support/src/f16.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

tests/lib/cmsis_dsp/support/src/f16.c:187 -static void test_arm_weighted_average_f16( - int ref_offset, size_t length) +static void test_arm_weighted_average_f16(int ref_offset, size_t length)

Check notice on line 187 in tests/lib/cmsis_dsp/support/src/f16.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

tests/lib/cmsis_dsp/support/src/f16.c:187 -static void test_arm_weighted_average_f16( - int ref_offset, size_t length) +static void test_arm_weighted_average_f16(int ref_offset, size_t length)
const float16_t *val = (const float16_t *)in_weighted_sum_val;
const float16_t *coeff = (const float16_t *)in_weighted_sum_coeff;
const float16_t *ref = (const float16_t *)ref_weighted_sum;
Expand All @@ -195,7 +195,7 @@
zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);

/* Run test function */
output[0] = arm_weighted_sum_f16(val, coeff, length);
output[0] = arm_weighted_average_f16(val, coeff, length);

/* Validate output */
zassert_true(
Expand All @@ -207,8 +207,8 @@
free(output);
}

DEFINE_TEST_VARIANT2(support_f16, arm_weighted_sum_f16, 7, 0, 7);
DEFINE_TEST_VARIANT2(support_f16, arm_weighted_sum_f16, 16, 1, 16);
DEFINE_TEST_VARIANT2(support_f16, arm_weighted_sum_f16, 23, 2, 23);
DEFINE_TEST_VARIANT2(support_f16, arm_weighted_average_f16, 7, 0, 7);
DEFINE_TEST_VARIANT2(support_f16, arm_weighted_average_f16, 16, 1, 16);
DEFINE_TEST_VARIANT2(support_f16, arm_weighted_average_f16, 23, 2, 23);

ZTEST_SUITE(support_f16, NULL, NULL, NULL, NULL, NULL);
10 changes: 5 additions & 5 deletions tests/lib/cmsis_dsp/support/src/f32.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@
DEFINE_TEST_VARIANT3(support_f32, arm_float_to_q7, 32, in_f32, ref_q7, 32);
DEFINE_TEST_VARIANT3(support_f32, arm_float_to_q7, 33, in_f32, ref_q7, 33);

static void test_arm_weighted_sum_f32(
static void test_arm_weighted_average_f32(
int ref_offset, size_t length)
{

Check notice on line 150 in tests/lib/cmsis_dsp/support/src/f32.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

tests/lib/cmsis_dsp/support/src/f32.c:150 -static void test_arm_weighted_average_f32( - int ref_offset, size_t length) +static void test_arm_weighted_average_f32(int ref_offset, size_t length)

Check notice on line 150 in tests/lib/cmsis_dsp/support/src/f32.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

tests/lib/cmsis_dsp/support/src/f32.c:150 -static void test_arm_weighted_average_f32( - int ref_offset, size_t length) +static void test_arm_weighted_average_f32(int ref_offset, size_t length)
const float32_t *val = (const float32_t *)in_weighted_sum_val;
const float32_t *coeff = (const float32_t *)in_weighted_sum_coeff;
const float32_t *ref = (const float32_t *)ref_weighted_sum;
Expand All @@ -158,7 +158,7 @@
zassert_not_null(output, ASSERT_MSG_BUFFER_ALLOC_FAILED);

/* Run test function */
output[0] = arm_weighted_sum_f32(val, coeff, length);
output[0] = arm_weighted_average_f32(val, coeff, length);

/* Validate output */
zassert_true(
Expand All @@ -170,9 +170,9 @@
free(output);
}

DEFINE_TEST_VARIANT2(support_f32, arm_weighted_sum_f32, 3, 0, 3);
DEFINE_TEST_VARIANT2(support_f32, arm_weighted_sum_f32, 8, 1, 8);
DEFINE_TEST_VARIANT2(support_f32, arm_weighted_sum_f32, 11, 2, 11);
DEFINE_TEST_VARIANT2(support_f32, arm_weighted_average_f32, 3, 0, 3);
DEFINE_TEST_VARIANT2(support_f32, arm_weighted_average_f32, 8, 1, 8);
DEFINE_TEST_VARIANT2(support_f32, arm_weighted_average_f32, 11, 2, 11);

static void test_arm_sort_out(
const uint32_t *input1, const uint32_t *ref, size_t length,
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ manifest:
groups:
- hal
- name: cmsis-dsp
revision: 6489e771e9c405f1763b52d64a3f17a1ec488ace
revision: d80a49b2bb186317dc1db4ac88da49c0ab77e6e7
path: modules/lib/cmsis-dsp
- name: cmsis-nn
revision: ea987c1ca661be723de83bd159aed815d6cbd430
Expand Down
Loading