Unverified Commit a5048f6a authored by tfosdike's avatar tfosdike Committed by GitHub
Browse files

Fixed compiler warnings (#95)



Fixed shadowed variables in assembly macros for Cortex-M convolution
Fixed type promotions in _f64 matrix and transform code

Co-authored-by: default avatarTimothy Fosdike <tfosdike@redarc.com.au>
parent ac64fccf
Loading
Loading
Loading
Loading
+158 −158

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ float64_t arm_cosine_distance_f64(const float64_t *pA,const float64_t *pB, uint3
    arm_dot_prod_f64(pA,pB,blockSize,&dot);

    tmp = sqrt(pwra * pwrb);
    return(1. - dot / tmp);
    return(1.0L - dot / tmp);

}

+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
 */

#include "dsp/distance_functions.h"
#include "dsp/matrix_utils.h"
#include <limits.h>
#include <math.h>

+12 −6
Original line number Diff line number Diff line
@@ -453,13 +453,19 @@ arm_status arm_conv_partial_q15(
        }

        /* Store the results in the accumulators in the destination buffer. */
        {
          int32_t sat0 = __SSAT((acc0 >> 15), 16);
          int32_t sat1 = __SSAT((acc1 >> 15), 16);
          int32_t sat2 = __SSAT((acc2 >> 15), 16);
          int32_t sat3 = __SSAT((acc3 >> 15), 16);
#ifndef  ARM_MATH_BIG_ENDIAN
        write_q15x2_ia (&pOut, __PKHBT(__SSAT((acc0 >> 15), 16), __SSAT((acc1 >> 15), 16), 16));
        write_q15x2_ia (&pOut, __PKHBT(__SSAT((acc2 >> 15), 16), __SSAT((acc3 >> 15), 16), 16));
          write_q15x2_ia (&pOut, __PKHBT(sat0, sat1, 16));
          write_q15x2_ia (&pOut, __PKHBT(sat2, sat3, 16));
#else
        write_q15x2_ia (&pOut, __PKHBT(__SSAT((acc1 >> 15), 16), __SSAT((acc0 >> 15), 16), 16));
        write_q15x2_ia (&pOut, __PKHBT(__SSAT((acc3 >> 15), 16), __SSAT((acc2 >> 15), 16), 16));
          write_q15x2_ia (&pOut, __PKHBT(sat1, sat0, 16));
          write_q15x2_ia (&pOut, __PKHBT(sat3, sat2, 16));
#endif /*      #ifndef  ARM_MATH_BIG_ENDIAN    */
        }

        /* Increment the pointer pIn1 index, count by 4 */
        count += 4U;
+10 −5
Original line number Diff line number Diff line
@@ -586,14 +586,19 @@ void arm_conv_q15(
      }

      /* Store the result in the accumulator in the destination buffer. */
      {
        int32_t sat0 = __SSAT((acc0 >> 15), 16);
        int32_t sat1 = __SSAT((acc1 >> 15), 16);
        int32_t sat2 = __SSAT((acc2 >> 15), 16);
        int32_t sat3 = __SSAT((acc3 >> 15), 16);
#ifndef  ARM_MATH_BIG_ENDIAN
      write_q15x2_ia (&pOut, __PKHBT(__SSAT((acc0 >> 15), 16), __SSAT((acc1 >> 15), 16), 16));
      write_q15x2_ia (&pOut, __PKHBT(__SSAT((acc2 >> 15), 16), __SSAT((acc3 >> 15), 16), 16));
        write_q15x2_ia (&pOut, __PKHBT(sat0, sat1, 16));
        write_q15x2_ia (&pOut, __PKHBT(sat2, sat3, 16));
#else
      write_q15x2_ia (&pOut, __PKHBT(__SSAT((acc1 >> 15), 16), __SSAT((acc0 >> 15), 16), 16));
      write_q15x2_ia (&pOut, __PKHBT(__SSAT((acc3 >> 15), 16), __SSAT((acc2 >> 15), 16), 16));
        write_q15x2_ia (&pOut, __PKHBT(sat1, sat0, 16));
        write_q15x2_ia (&pOut, __PKHBT(sat3, sat2, 16));
#endif /*      #ifndef  ARM_MATH_BIG_ENDIAN    */

      }
      /* Increment the pointer pIn1 index, count by 4 */
      count += 4U;

Loading