Skip to content

Commit

Permalink
Correct build issues related to issue ARM-software#197
Browse files Browse the repository at this point in the history
Problem with f16
Implicit conversions from float to int
  • Loading branch information
christophe0606 committed Jul 16, 2024
1 parent 60a6ec1 commit fc6da81
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
9 changes: 5 additions & 4 deletions Source/DistanceFunctions/arm_dtw_path_f32.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,18 +141,19 @@ ARM_DSP_ATTRIBUTE void arm_dtw_path_f32(const arm_matrix_instance_f32 *pDTW,

/* Reverse the path */
int16_t *fh,*sh;
int16_t itemp;
fh = pPath;
sh = pPath + 2* (*pathLength)-2;
int halfLength = (*pathLength)>>1;
for(int i = 0; i< halfLength; i++)
{
temp = fh[0];
itemp = fh[0];
fh[0] = sh[0];
sh[0] = temp;
sh[0] = itemp;

temp = fh[1];
itemp = fh[1];
fh[1] = sh[1];
sh[1] = temp;
sh[1] = itemp;

fh += 2;
sh -= 2;
Expand Down
2 changes: 1 addition & 1 deletion Source/FastMathFunctions/arm_atan2_f16.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ ARM_DSP_ATTRIBUTE arm_status arm_atan2_f16(float16_t y,float16_t x,float16_t *re
}
else
{
if (signbit(y))
if (signbit((float)y))
{
*result= -(_Float16)PIF16;
}
Expand Down
12 changes: 7 additions & 5 deletions Source/TransformFunctions/arm_bitreversal_f16.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@

#include "dsp/transform_functions_f16.h"

void arm_bitreversal_f16(
float16_t * pSrc,
uint16_t fftSize,
uint16_t bitRevFactor,
const uint16_t * pBitRevTab);


/*
* @brief In-place bit reversal function.
Expand All @@ -44,6 +40,12 @@ const uint16_t * pBitRevTab);

#if defined(ARM_FLOAT16_SUPPORTED)

void arm_bitreversal_f16(
float16_t * pSrc,
uint16_t fftSize,
uint16_t bitRevFactor,
const uint16_t * pBitRevTab);

ARM_DSP_ATTRIBUTE void arm_bitreversal_f16(
float16_t * pSrc,
uint16_t fftSize,
Expand Down
3 changes: 3 additions & 0 deletions Testing/cmsis_build/cdefault.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ default:
C:
- -Wsign-compare
- -Wdouble-promotion
- -Wfloat-conversion
- -DNDEBUG
- -Wall
- -Wextra
Expand Down Expand Up @@ -55,6 +56,7 @@ default:
C:
- -Wsign-compare
- -Wdouble-promotion
- -Wfloat-conversion
- -DNDEBUG
- -Wall
- -Wextra
Expand Down Expand Up @@ -102,6 +104,7 @@ default:
C:
- -Wsign-compare
- -Wdouble-promotion
- -Wfloat-conversion
- -DNDEBUG
- -Wall
- -Wextra
Expand Down
9 changes: 9 additions & 0 deletions dsppp/cdefault.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ default:
C:
- -Wsign-compare
- -Wdouble-promotion
- -Wfloat-conversion
- -DNDEBUG
- -Wall
- -Wextra
Expand All @@ -30,6 +31,8 @@ default:
CPP:
- -fno-rtti
- -fno-exceptions
- -Wdouble-promotion
- -Wfloat-conversion
- -DNDEBUG
- -Wall
- -Wextra
Expand All @@ -53,6 +56,7 @@ default:
C:
- -Wsign-compare
- -Wdouble-promotion
- -Wfloat-conversion
- -DNDEBUG
- -Wall
- -Wextra
Expand All @@ -73,6 +77,8 @@ default:
CPP:
- -fno-rtti
- -fno-exceptions
- -Wdouble-promotion
- -Wfloat-conversion
- -DNDEBUG
- -Wall
- -Wextra
Expand Down Expand Up @@ -100,6 +106,7 @@ default:
C:
- -Wsign-compare
- -Wdouble-promotion
- -Wfloat-conversion
- -DNDEBUG
- -Wall
- -Wextra
Expand All @@ -122,6 +129,8 @@ default:
CPP:
- -fno-rtti
- -fno-exceptions
- -Wdouble-promotion
- -Wfloat-conversion
- -DNDEBUG
- -Wall
- -Wextra
Expand Down

0 comments on commit fc6da81

Please sign in to comment.