summaryrefslogtreecommitdiff
path: root/source/use_case/img_class/src/MainLoop.cc
diff options
context:
space:
mode:
authorLiam Barry <liam.barry@arm.com>2022-05-09 17:06:19 +0100
committerKshitij Sisodia <kshitij.sisodia@arm.com>2022-05-12 16:10:06 +0000
commit213a543dd0d07b2f8d51a9c7e2055fd99291c960 (patch)
tree7357c9961f395131140f8937e732fee68963dc63 /source/use_case/img_class/src/MainLoop.cc
parentdd44d29775e53ad311e1997bb8a7670d0ee6383e (diff)
downloadml-embedded-evaluation-kit-213a543dd0d07b2f8d51a9c7e2055fd99291c960.tar.gz
MLECO-3186: Each use case should same namespace convention as KWS and ASR
Certain UCs required additional work due to case context variables which also became part of a namespace in generated files. Solution was to declare these extra variables as part of the UC namespace in the respective model.hpp files. Additional changes to standardise use of namespaces may be required - proposing new task. Minor typo and rewording of customizing.md in relevant sections included. Signed-off-by: Liam Barry <liam.barry@arm.com> Change-Id: Ie78f82a30be252cb841136ea5115f21fc8d762cb
Diffstat (limited to 'source/use_case/img_class/src/MainLoop.cc')
-rw-r--r--source/use_case/img_class/src/MainLoop.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/source/use_case/img_class/src/MainLoop.cc b/source/use_case/img_class/src/MainLoop.cc
index 86ea2ea..a44a401 100644
--- a/source/use_case/img_class/src/MainLoop.cc
+++ b/source/use_case/img_class/src/MainLoop.cc
@@ -24,14 +24,15 @@
#include "BufAttributes.hpp" /* Buffer attributes to be applied */
namespace arm {
- namespace app {
- static uint8_t tensorArena[ACTIVATION_BUF_SZ] ACTIVATION_BUF_ATTRIBUTE;
- } /* namespace app */
+namespace app {
+ static uint8_t tensorArena[ACTIVATION_BUF_SZ] ACTIVATION_BUF_ATTRIBUTE;
+ namespace img_class {
+ extern uint8_t* GetModelPointer();
+ extern size_t GetModelLen();
+ } /* namespace img_class */
+} /* namespace app */
} /* namespace arm */
-extern uint8_t* GetModelPointer();
-extern size_t GetModelLen();
-
using ImgClassClassifier = arm::app::Classifier;
void main_loop()
@@ -41,8 +42,8 @@ void main_loop()
/* Load the model. */
if (!model.Init(arm::app::tensorArena,
sizeof(arm::app::tensorArena),
- GetModelPointer(),
- GetModelLen())) {
+ arm::app::img_class::GetModelPointer(),
+ arm::app::img_class::GetModelLen())) {
printf_err("Failed to initialise model\n");
return;
}