You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
math: numbers: use const array arguments and add Doxygen documentation #11590
Sub-issue of #10110 (follow-up after the CMocka to ztest migration).
Problem
The vector helpers in src/math/numbers.c take their input arrays as non-const pointers although they only read them, and they are documented with plain comments instead of Doxygen:
Callers that hold const data have to cast it away, and the parameters (for example the meaning of max_results <= 0) are not described in the generated documentation.
Original note in #10110: "Refactor functions in sof/src/math/numbers.c: constants as function arguments + update documentation".
Proposed change
Make the read-only array arguments const in src/math/numbers.c and src/include/sof/math/numbers.h
Add Doxygen comments (@brief, @param, @return) for the functions of numbers.c
Update the callers and the ztest suite test/ztest/unit/math/basic/arithmetic where needed
Activity