Commit 60f22e09 authored by Christophe Favergeon's avatar Christophe Favergeon
Browse files

Improvements to Python wrapper and corrections for distance and window.

parents 5f5086fa 82d94159
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2,6 +2,5 @@ include PythonWrapper_README.md
recursive-include Include *.h 
recursive-include PrivateInclude *.h 
recursive-include PythonWrapper/cmsisdsp_pkg/src *.h 
include cmsisdsp/cg/scheduler/templates/*
include Source/DistanceFunctions/arm_boolean_distance_template.h
+1 −1
Original line number Diff line number Diff line
cmake -DHOST=YES ^
  -DLOOPUNROLL=ON ^
  -DWRAPPER=YES ^
  -DCMSISDSP="path to CMSIS-DSP folder" ^
  -DCMSISDSP=".." ^
  -DCMAKE_C_FLAGS_RELEASE="-std=c11 -Ofast -ffast-math -DNDEBUG -Wall -Wextra" ^
  -DCMAKE_CXX_FLAGS_RELEASE="-fno-rtti -std=c++11 -Ofast -ffast-math -DNDEBUG -Wall -Wextra -Wno-unused-parameter" ^
  -G "Unix Makefiles" ..
+2 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ cmake -DHOST=YES \
  -DLOOPUNROLL=ON \
  -DWRAPPER=YES \
  -DCMAKE_POSITION_INDEPENDENT_CODE=YES \
  -DCMSISDSP="path to CMSIS-DSP folder" \
  -DCMSISDSP=".." \
  -DCMAKE_C_FLAGS_RELEASE="-std=c11 -Ofast -ffast-math -DNDEBUG -Wall -Wextra" \
  -DCMAKE_CXX_FLAGS_RELEASE="-fno-rtti -std=c++11 -Ofast -ffast-math -DNDEBUG -Wall -Wextra -Wno-unused-parameter" \
  -G "Unix Makefiles" ..
+4 −4
Original line number Diff line number Diff line
@@ -227,7 +227,7 @@ cmsis_arm_dtw_init_window_q7(PyObject *obj,
  arm_matrix_instance_q7 pSrc_converted; // input
   

  if (PyArg_ParseTuple(args,"iiO",&winType,&winSize,&pSrc));
  if (PyArg_ParseTuple(args,"iiO",&winType,&winSize,&pSrc))
  {

    q7MatrixFromNumpy(&pSrc_converted,pSrc);
@@ -267,7 +267,7 @@ cmsis_arm_dtw_distance_f32(PyObject *obj,
  arm_matrix_instance_f32 dtw_converted;


  if (PyArg_ParseTuple(args,"OO",&pDist,&pWin));
  if (PyArg_ParseTuple(args,"OO",&pDist,&pWin))
  {

    f32MatrixFromNumpy(&pDist_converted,pDist);
@@ -348,7 +348,7 @@ cmsis_arm_dtw_path_f32(PyObject *obj,
     Py_DECREF(pDstOBJ);
     return(pythonResult);
  }

  Py_RETURN_NONE;
}

static PyMethodDef CMSISDSPMethods[] = {
+2 −2
Original line number Diff line number Diff line
@@ -32,9 +32,9 @@
#include <numpy/numpyconfig.h>

// API version used on google colab
// List on https://github.com/numpy/numpy/blob/main/numpy/core/include/numpy/numpyconfig.h
// List in https://github.com/numpy/numpy numpyconfig.h
#if (NPY_API_VERSION != 0x0000000F )
#error("Error building with wrong NumPy API version")
//#error("Error building with wrong NumPy API version")
#endif

#ifdef WIN
Loading