Skip to content

Commit

Permalink
input range must be in [0:2PI]
Browse files Browse the repository at this point in the history
  • Loading branch information
ARM IT committed Nov 10, 2017
1 parent 7f348f2 commit 0332af9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMSIS/DSP/Source/FastMathFunctions/arm_cos_f32.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* Computes the trigonometric cosine function using a combination of table lookup
* and linear interpolation. There are separate functions for
* Q15, Q31, and floating-point data types.
* The input to the floating-point version is in radians while the
* The input to the floating-point version is in radians and in the range [0 2*pi) while the
* fixed-point Q15 and Q31 have a scaled input with the range
* [0 +0.9999] mapping to [0 2*pi). The fixed-point range is chosen so that a
* value of 2*pi wraps around to 0.
Expand Down
27 changes: 24 additions & 3 deletions CMSIS/DSP/Source/FilteringFunctions/arm_conv_partial_f32.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,14 @@ arm_status arm_conv_partial_f32(
count += 4U;

/* Update the inputA and inputB pointers for next MAC calculation */
px = pIn1 + count;
if ((int32_t)firstIndex - (int32_t)srcBLen + 1 > 0)
{
px = pIn1 + firstIndex - srcBLen + 1 + count;
}
else
{
px = pIn1 + count;
}
py = pSrc2;

/* Decrement the loop counter */
Expand Down Expand Up @@ -473,7 +480,14 @@ arm_status arm_conv_partial_f32(
count++;

/* Update the inputA and inputB pointers for next MAC calculation */
px = pIn1 + count;
if ((int32_t)firstIndex - (int32_t)srcBLen + 1 > 0)
{
px = pIn1 + firstIndex - srcBLen + 1 + count;
}
else
{
px = pIn1 + count;
}
py = pSrc2;

/* Decrement the loop counter */
Expand Down Expand Up @@ -510,7 +524,14 @@ arm_status arm_conv_partial_f32(
count++;

/* Update the inputA and inputB pointers for next MAC calculation */
px = pIn1 + count;
if ((int32_t)firstIndex - (int32_t)srcBLen + 1 > 0)
{
px = pIn1 + firstIndex - srcBLen + 1 + count;
}
else
{
px = pIn1 + count;
}
py = pSrc2;

/* Decrement the loop counter */
Expand Down

0 comments on commit 0332af9

Please sign in to comment.