diff options
Diffstat (limited to 'src/codec2_math.h')
| -rw-r--r-- | src/codec2_math.h | 55 |
1 files changed, 34 insertions, 21 deletions
diff --git a/src/codec2_math.h b/src/codec2_math.h index 31e4880..c7312f0 100644 --- a/src/codec2_math.h +++ b/src/codec2_math.h @@ -4,7 +4,7 @@ //========================================================================== // Name: codec2_math.h // -// Purpose: A wrapper around architecture specific math libraries +// Purpose: A wrapper around architecture specific math libraries // used on embedded devices to improve Codec2 performance. // Created: May 15, 2022 // Authors: Mooneer Salem @@ -27,44 +27,57 @@ #include <stddef.h> #ifdef __cplusplus -extern "C" -{ -#endif // __cplusplus +extern "C" { +#endif // __cplusplus #include "comp.h" //========================================================================== -// Note: the functions in this file must be implemented in your code if you -// intend on using Codec2 in a non-ARM based embedded device. Otherwise, -// linker errors will occur. For ARM, a default implementation of these +// Note: the functions in this file must be implemented in your code if you +// intend on using Codec2 in a non-ARM based embedded device. Otherwise, +// linker errors will occur. For ARM, a default implementation of these // functions exists in codec2_math_arm.c. //========================================================================== - + //========================================================================== /// 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); +void codec2_dot_product_f32(float* leftHandSideRealVector, + float* rightHandSideRealVector, size_t vectorLength, + float* 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. /// //========================================================================== -void codec2_complex_dot_product_f32(COMP* leftHandSideComplexVector, COMP* rightHandSideComplexVector, size_t vectorLength, float* resultReal, float* resultImag); +void codec2_complex_dot_product_f32(COMP* leftHandSideComplexVector, + COMP* rightHandSideComplexVector, + size_t vectorLength, float* resultReal, + float* resultImag); #ifdef __cplusplus } -#endif // __cplusplus +#endif // __cplusplus -#endif // CODEC2_MATH_H +#endif // CODEC2_MATH_H |
