Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the header prefixes to be architecture agnostic #52

Open
yperess opened this issue Sep 30, 2022 · 3 comments
Open

Update the header prefixes to be architecture agnostic #52

yperess opened this issue Sep 30, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@yperess
Copy link

yperess commented Sep 30, 2022

I have a need for a similar math library in Zephyr which needs to work for and ideally be optimized for additional architectures beyond ARM. I was wondering if it would be possible to rename the headers and replace the arm_ prefix with cmsis_? the arm_ prefixed headers can still exist and simply include their generic counterparts. This would allow us to provide Zephyr implementations for non arm optimized math logic.

Reference zephyrproject-rtos/zephyr#50012

@christophe0606 christophe0606 added the review Under review label Oct 3, 2022
@christophe0606
Copy link
Contributor

@yperess I am always trying to help but then it is a problem of priorities. I have a lot in my backlog and not a lot of time. So clearly such a change would have low priority compared to other tasks I have to do.

Also, I need to maintain (as much as possible), backward compatibility. As consequence, I'll never change the name of the functions.

the arm_ prefixed headers can still exist and simply include their generic counterparts.

Why not doing the opposite ? You could have a cmsis_dsp_math.h including the arm_math.h

You could also define some macro like

#define cmsis_dsp_add_f32 arm_add_f32

allowing your developers to use cmsis_dsp_* functions.

Like that, it would be totally transparent to CMSIS-DSP and I think it would not make your life much more difficult when pulling new CMSIS-DSP version.

Regarding other comments in the Zephyr discussion regarding strongly typed libraries: In pure C, it will be difficult to be as good as C++ for this.

But there are definitely things to improve and I have already a github issues about it. There is lot of legacy in the library and things to improve.

@yperess
Copy link
Author

yperess commented Oct 3, 2022

I'll be happy to send a PR that matches what you described

@microbuilder
Copy link

A cmsis_dsp_* wrapper seems sensible to me, and still maintains an association with Arm as the main project maintainer (via cmsis), since they deserve credit for their work, without implying that this only works on Arm.

@christophe0606 christophe0606 added enhancement New feature or request and removed review Under review labels Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants