Skip to content

cmsis_dsp: Use float16_t in MVE arm_barycenter_f16 - #352

Open
matthewbstokes-zz wants to merge 1 commit into
ARM-software:mainfrom
matthewbstokes-zz:fix-mve-barycenter-f16
Open

matthewbstokes-zz wants to merge 1 commit into
ARM-software:mainfrom
matthewbstokes-zz:fix-mve-barycenter-f16

Conversation

@matthewbstokes-zz

Copy link
Copy Markdown

Fixes #351

Problem Statement

In Source/SupportFunctions/arm_barycenter_f16.c, accum, w, and w1–w4 inside the MVE implementation are declared as _Float16.

When compiling with MVE enabled (e.g. Cortex-M55 / Cortex-M85 / Armv8.1-M.main) using Clang or GCC, passing _Float16 variables into MVE vector-by-scalar intrinsics (vfmaq_n_f16, vmulq_n_f16) causes a compilation error because the _Generic macro selector does not match the scalar type:

error: '_Generic' selector of type '...' is not compatible with any association outV = vfmaq(outV, inV1, w1);

Solution

Change accum, w, and w1–w4 from _Float16 to float16_t in Source/SupportFunctions/arm_barycenter_f16.c. This matches the parameter types and the conventions used throughout the other MVE DSP functions, resolving the build failure.

- Restore float16_t for accum, w, and w1-w4 in the MVE branch of
  arm_barycenter_f16 to resolve _Generic selector mismatch with
  ARM MVE vector-by-scalar intrinsics.

Signed-off-by: Matt Stokes <matthewbstokes@google.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: arm_barycenter_f16 fails to compile on MVE due to _Generic selector mismatch with _Float16

2 participants