Skip to content

Commit

Permalink
Update to biquad df2t f32 tests since the Neon version is disabled be…
Browse files Browse the repository at this point in the history
…cause of problems.

So the test must use the scalar version.

Re-enabled all other tests.
Added Neon badge to README.
  • Loading branch information
christophe0606 committed Jan 23, 2025
1 parent a9dda51 commit f8b0e25
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 24 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/runcpptest.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: CPP Tests
#on:
# workflow_dispatch:
# pull_request:
# branches: [main]
# push:
# branches: [main]
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]

permissions:
actions: read
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/runneontest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ jobs:
cmake -G "Ninja" ..
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3

- name: Execute generic tests
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/runtest.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: C Tests
#on:
# workflow_dispatch:
# pull_request:
# branches: [main]
# push:
# branches: [main]
on:
workflow_dispatch:
pull_request:
branches: [main]
push:
branches: [main]

permissions:
actions: read
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

[![CPP Tests](https://github.com/ARM-software/CMSIS-DSP/actions/workflows/runcpptest.yaml/badge.svg)](https://github.com/ARM-software/CMSIS-DSP/actions/workflows/runcpptest.yaml)

[![Neon Tests](https://github.com/ARM-software/CMSIS-DSP/actions/workflows/runneontest.yaml/badge.svg)](https://github.com/ARM-software/CMSIS-DSP/actions/workflows/runneontest.yaml)

## About

CMSIS-DSP is an optimized compute library for embedded systems (DSP is in the name for legacy reasons).
Expand Down
25 changes: 15 additions & 10 deletions Testing/Source/Tests/BIQUADF32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ Reference patterns are generated with
a double precision computation.
*/
#define REL_ERROR (1.2e-3)

#define REL_ERROR (1.0e-4)

void BIQUADF32::test_biquad_cascade_df1_ref()
{
Expand Down Expand Up @@ -118,9 +117,12 @@ a double precision computation.
The filter is initialized with the coefs, blockSize and numTaps.
*/
#if !defined(ARM_MATH_NEON)
// Neon disabled because this filter has issues with Neon.
// So test changed to use the scalar version
//#if !defined(ARM_MATH_NEON)
arm_biquad_cascade_df2T_init_f32(&this->Sdf2T,3,coefsp,statep);
#else
#if 0
//#else
float32_t *vecCoefsPtr = vecCoefs.ptr();

// Those Neon coefs must be computed from original coefs
Expand Down Expand Up @@ -244,11 +246,13 @@ a double precision computation.
float32_t *statep = state.ptr();
const int16_t *configsp = configs.ptr();

#if !defined(ARM_MATH_NEON)
// Neon version has issues and is disabled.
// So the test is not using Neon version
//#if !defined(ARM_MATH_NEON)
const float32_t *coefsp = coefs.ptr();
#else
float32_t *coefsp = coefs.ptr();
#endif
//#else
// float32_t *coefsp = coefs.ptr();
//#endif

const float32_t *inputp = inputs.ptr();
float32_t *outp = output.ptr();
Expand Down Expand Up @@ -284,9 +288,10 @@ a double precision computation.
The filter is initialized with the coefs, blockSize and numTaps.
*/
#if !defined(ARM_MATH_NEON)
//#if !defined(ARM_MATH_NEON)
arm_biquad_cascade_df2T_init_f32(&this->Sdf2T,numStages,coefsp,statep);
#else
//#else
#if 0
float32_t *vecCoefsPtr = vecCoefs.ptr();

// Those Neon coefs must be computed from original coefs
Expand Down

0 comments on commit f8b0e25

Please sign in to comment.