xmos / lib_dsp

Core digital signal processing function library
Other
22 stars 28 forks source link

vector_mulv_addv testing broken #86

Open henkmuller opened 7 years ago

henkmuller commented 7 years ago

Reported on xcore.com

henkmuller commented 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.

johned0 commented 7 years ago

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

johned0 commented 7 years ago

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

henkmuller commented 7 years ago

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.

johned0 commented 7 years ago

Agreed, Henk, this is one of the areas that needs tidying up so test cases should cover longer arrays

henkmuller commented 7 years ago

I renamed the issue to reflect that the code is probably ok, but it is the testing that needs fixing.

johned0 commented 7 years ago

indeed

oscarbailey-xmos commented 6 years ago

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.

My Fork

oscarbailey-xmos commented 3 years ago

Related issue: https://github.com/xmos/lib_dsp/issues/123