[MLBEDSW-297] Setup and run on Microsoft Windows
Various updates to make vela run and produce identical output on
Microsoft Windows.
* Fixed overflow errors
* Fixed compile warnings
* Avoid problematic numpy version
* Updated README.md
Signed-off-by: Fredrik Svedberg <Fredrik.Svedberg@arm.com>
Change-Id: Ie48c63a92a00c81b3247d07f05b75d881319ddbb
diff --git a/ethosu/mlw_codec/mlw_codecmodule.c b/ethosu/mlw_codec/mlw_codecmodule.c
index de945ab..6dde12d 100644
--- a/ethosu/mlw_codec/mlw_codecmodule.c
+++ b/ethosu/mlw_codec/mlw_codecmodule.c
@@ -53,7 +53,7 @@
return NULL;
/* Unpack the length of the input integer list. */
- int input_length = PyObject_Length (input_list_object);
+ int input_length = (int)PyObject_Length (input_list_object);
if (input_length < 0)
input_length = 0;
@@ -73,7 +73,7 @@
item = PyList_GetItem(input_list_object, i);
if (!PyLong_Check(item))
input_buffer[i] = 0;
- input_buffer[i] = PyLong_AsLong(item);
+ input_buffer[i] = (int16_t)PyLong_AsLong(item);
}
/* We don't know the output length required, we guess worst case,
@@ -126,7 +126,7 @@
/* Unpack the input buffer and length from the bytearray object. */
uint8_t *input_buffer = (uint8_t *) PyByteArray_AsString(input_bytearray_object);
- int input_length = PyByteArray_Size(input_bytearray_object);
+ int input_length = (int)PyByteArray_Size(input_bytearray_object);
/* We don't know the output length required, we guess, but the guess
* will be too small, the mlw_decode call will do a resize (upwards)