summaryrefslogtreecommitdiff
path: root/scripts/py/templates
diff options
context:
space:
mode:
authorRichard Burton <richard.burton@arm.com>2021-11-10 16:27:14 +0000
committerRichard <richard.burton@arm.com>2021-11-10 16:34:16 +0000
commit005534664e192cf909a11435c4bc4696b1f4c51f (patch)
treef8314bd284561e1f0ff68fc393ee22d0318ae162 /scripts/py/templates
parentdee53bc7769d6201ec27deea4405c0df6c9b0623 (diff)
downloadml-embedded-evaluation-kit-005534664e192cf909a11435c4bc4696b1f4c51f.tar.gz
MLECO-2354 MLECO-2355 MLECO-2356: Moving noise reduction to public repository
* Use RNNoise model from PMZ * Add Noise reduction use-case Signed-off-by: Richard burton <richard.burton@arm.com> Change-Id: Ia8cc7ef102e22a5ff8bfbd3833594a4905a66057
Diffstat (limited to 'scripts/py/templates')
-rw-r--r--scripts/py/templates/TestData.cc.template4
-rw-r--r--scripts/py/templates/TestData.hpp.template15
2 files changed, 12 insertions, 7 deletions
diff --git a/scripts/py/templates/TestData.cc.template b/scripts/py/templates/TestData.cc.template
index 1acd14d..d0f2698 100644
--- a/scripts/py/templates/TestData.cc.template
+++ b/scripts/py/templates/TestData.cc.template
@@ -32,7 +32,7 @@ static const {{data_type}} *ofm_arrays[] = {
const {{data_type}}* get_ifm_data_array(const uint32_t idx)
{
- if (idx < NUMBER_OF_FM_FILES) {
+ if (idx < NUMBER_OF_IFM_FILES) {
return ifm_arrays[idx];
}
return nullptr;
@@ -40,7 +40,7 @@ const {{data_type}}* get_ifm_data_array(const uint32_t idx)
const {{data_type}}* get_ofm_data_array(const uint32_t idx)
{
- if (idx < NUMBER_OF_FM_FILES) {
+ if (idx < NUMBER_OF_OFM_FILES) {
return ofm_arrays[idx];
}
return nullptr;
diff --git a/scripts/py/templates/TestData.hpp.template b/scripts/py/templates/TestData.hpp.template
index cdedd48..413c062 100644
--- a/scripts/py/templates/TestData.hpp.template
+++ b/scripts/py/templates/TestData.hpp.template
@@ -25,16 +25,21 @@
namespace {{namespace}} {
{% endfor %}
-#define NUMBER_OF_FM_FILES ({{fm_count}}U)
-#define IFM_DATA_SIZE ({{ifm_var_size}}U)
-#define OFM_DATA_SIZE ({{ofm_var_size}}U)
+#define NUMBER_OF_IFM_FILES ({{ifm_count}}U)
+#define NUMBER_OF_OFM_FILES ({{ofm_count}}U)
+{% for ifm_size in ifm_var_sizes %}
+#define IFM_{{loop.index0}}_DATA_SIZE ({{ifm_size}}U)
+{% endfor %}
+{% for ofm_size in ofm_var_sizes %}
+#define OFM_{{loop.index0}}_DATA_SIZE ({{ofm_size}}U)
+{% endfor %}
{% for ifm_var_name in ifm_var_names %}
-extern const {{data_type}} {{ifm_var_name}}[IFM_DATA_SIZE];
+extern const {{data_type}} {{ifm_var_name}}[IFM_{{loop.index0}}_DATA_SIZE];
{% endfor %}
{% for ofm_var_name in ofm_var_names %}
-extern const {{data_type}} {{ofm_var_name}}[OFM_DATA_SIZE];
+extern const {{data_type}} {{ofm_var_name}}[OFM_{{loop.index0}}_DATA_SIZE];
{% endfor %}
const {{data_type}}* get_ifm_data_array(const uint32_t idx);