Open henkmuller opened 7 years ago
I fixed it on my fork.
Two observations:
1) The test cases don’t test for vectors longer than 5 elements; there is a lot of special code for vectors with length greater than 7 2) The special code assumes that all arrays are 64 bit aligned; which they aren’t in the example program
I suggest we disable the special code for vectors longer than 7 elements.
Me too, Henk Pull request generated : https://github.com/xmos/lib_dsp/pull/87
The special code does give performance improvements. The arrays in the example are global so should be 64 bit aligned. J
BTW, I had a chat with Peter, on Monday. I've offered to try to find some time to spend working on lib_dsp, to make sure all the examples and documentation etc are correct and all the pull requests merged etc. Not sure when though, but hopefully soon. J
I appreciate that the special code speeds it up; but if there is no test case it is quite hard to see that it actually works. Re alignment: I hadn't appreciated that all global arrays are 64-bit aligned.
Agreed, Henk, this is one of the areas that needs tidying up so test cases should cover longer arrays
I renamed the issue to reflect that the code is probably ok, but it is the testing that needs fixing.
indeed
I've written some tests for the dsp_vector functions which seem to show that the muls_addv, muls_subv, mulv_addv, and mulv_subv do not give correct outputs for vector lengths > 7.
Related issue: https://github.com/xmos/lib_dsp/issues/123
Reported on xcore.com