diff options
| author | drowe67 <[email protected]> | 2023-07-14 12:36:50 +0930 |
|---|---|---|
| committer | David Rowe <[email protected]> | 2023-07-14 12:36:50 +0930 |
| commit | b86e88413d4c6ec428aaedb147f7675f28882fe4 (patch) | |
| tree | ce360925856e25d4343d59a37e2e6bac142d3752 /src/codec2_math_arm.c | |
| parent | 0c2e969cfbe85548801eeb20ad8113969604892a (diff) | |
clang-format -i applied to src unittest misc
Diffstat (limited to 'src/codec2_math_arm.c')
| -rw-r--r-- | src/codec2_math_arm.c | 54 |
1 files changed, 35 insertions, 19 deletions
diff --git a/src/codec2_math_arm.c b/src/codec2_math_arm.c index b14ad3a..b8af967 100644 --- a/src/codec2_math_arm.c +++ b/src/codec2_math_arm.c @@ -1,7 +1,7 @@ //========================================================================== // Name: codec2_math_arm.c // -// Purpose: A wrapper around architecture specific math libraries +// Purpose: A wrapper around architecture specific math libraries // used on ARM embedded devices to improve Codec2 performance. // Created: May 15, 2022 // Authors: Mooneer Salem @@ -22,36 +22,52 @@ //========================================================================== #if defined(__EMBEDDED__) && defined(__ARM_ARCH) -#include "codec2_math.h" #include "arm_math.h" +#include "codec2_math.h" //========================================================================== /// Calculates the dot product of two real-valued float vectors. /// -/// @param leftHandSideRealVector A pointer to the first vector to use for the dot product. -/// @param rightHandSideRealVector A pointer to the second vector to use for the dot product. -/// @param vectorLength The length of the vector. Both vectors should be at least this long. -/// @param resultReal A pointer to the variable in which to store the scalar result. +/// @param leftHandSideRealVector A pointer to the first vector to use for the +/// dot product. +/// @param rightHandSideRealVector A pointer to the second vector to use for the +/// dot product. +/// @param vectorLength The length of the vector. Both vectors should be at +/// least this long. +/// @param resultReal A pointer to the variable in which to store the scalar +/// result. //========================================================================== -void codec2_dot_product_f32(float* leftHandSideRealVector, float* rightHandSideRealVector, size_t vectorLength, float* resultReal) -{ - arm_dot_prod_f32(leftHandSideRealVector, rightHandSideRealVector, vectorLength, resultReal); +void codec2_dot_product_f32(float* leftHandSideRealVector, + float* rightHandSideRealVector, size_t vectorLength, + float* resultReal) { + arm_dot_prod_f32(leftHandSideRealVector, rightHandSideRealVector, + vectorLength, resultReal); } //========================================================================== /// Calculates the dot product of two complex-valued float vectors. /// -/// @param leftHandSideComplexVector A pointer to the first vector to use for the dot product. -/// @param rightHandSideComplexVector A pointer to the second vector to use for the dot product. -/// @param vectorLength The length of the vector. Both vectors should be at least this long. -/// @param resultReal A pointer to the variable in which to store the real component of the result. -/// @param resultImag A pointer to the variable in which to store the imaginary component of the result. +/// @param leftHandSideComplexVector A pointer to the first vector to use for +/// the dot product. +/// @param rightHandSideComplexVector A pointer to the second vector to use for +/// the dot product. +/// @param vectorLength The length of the vector. Both vectors should be at +/// least this long. +/// @param resultReal A pointer to the variable in which to store the real +/// component of the result. +/// @param resultImag A pointer to the variable in which to store the imaginary +/// component of the result. /// -/// @note Each array of floats is organized with even elements being real and odd elements imaginary. +/// @note Each array of floats is organized with even elements being real and +/// odd elements imaginary. //========================================================================== -void codec2_complex_dot_product_f32(COMP* leftHandSideComplexVector, COMP* rightHandSideComplexVector, size_t vectorLength, float* resultReal, float* resultImag) -{ - arm_cmplx_dot_prod_f32((float*)leftHandSideComplexVector, (float*)rightHandSideComplexVector, vectorLength, resultReal, resultImag); +void codec2_complex_dot_product_f32(COMP* leftHandSideComplexVector, + COMP* rightHandSideComplexVector, + size_t vectorLength, float* resultReal, + float* resultImag) { + arm_cmplx_dot_prod_f32((float*)leftHandSideComplexVector, + (float*)rightHandSideComplexVector, vectorLength, + resultReal, resultImag); } -#endif // defined(__EMBEDDED__) && defined(__ARM_ARCH) +#endif // defined(__EMBEDDED__) && defined(__ARM_ARCH) |
