diff options
author | alexander <alexander.efremov@arm.com> | 2022-02-10 16:15:54 +0000 |
---|---|---|
committer | alexander <alexander.efremov@arm.com> | 2022-02-10 18:04:42 +0000 |
commit | 31ae9f09bb3535975595e999fbc7baca889e46e8 (patch) | |
tree | 71f0cadc2620b9d18e474e5d40eda7b3d30a8ce4 /source/application/main/UseCaseCommonUtils.cc | |
parent | 3107aa2152de9be8317e62da1d0327bcad6552e2 (diff) | |
download | ml-embedded-evaluation-kit-31ae9f09bb3535975595e999fbc7baca889e46e8.tar.gz |
MLECO-2682: CMake and source refactoring.
MLECO-2930: logging macros were extracted from hal.h and used separately around the code.
MLECO-2931: arm_math lib introduced, cmsis-dsp removed from top level linkage.
MLECO-2915: platform related post-build steps.
Change-Id: Id718884e22f262a5c070ded3f3f5d4b048820147
Signed-off-by: alexander <alexander.efremov@arm.com>
Diffstat (limited to 'source/application/main/UseCaseCommonUtils.cc')
-rw-r--r-- | source/application/main/UseCaseCommonUtils.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/application/main/UseCaseCommonUtils.cc b/source/application/main/UseCaseCommonUtils.cc index 67e784b..dd9a32d 100644 --- a/source/application/main/UseCaseCommonUtils.cc +++ b/source/application/main/UseCaseCommonUtils.cc @@ -16,7 +16,9 @@ */ #include "UseCaseCommonUtils.hpp" #include "InputFiles.hpp" -#include <inttypes.h> +#include "log_macros.h" + +#include <cinttypes> void DisplayCommonMenu() @@ -74,7 +76,7 @@ bool image::PresentInferenceResult( platform.data_psn->present_data_text( resultStr.c_str(), resultStr.size(), - dataPsnTxtStartX1, rowIdx1, 0); + dataPsnTxtStartX1, rowIdx1, false); rowIdx1 += dataPsnTxtYIncr; resultStr = std::to_string(i + 1) + ") " + results[i].m_label; @@ -105,7 +107,7 @@ void image::RgbToGrayscale(const uint8_t *srcPtr, uint8_t *dstPtr, const size_t } } -void IncrementAppCtxIfmIdx(arm::app::ApplicationContext& ctx, std::string useCase) +void IncrementAppCtxIfmIdx(arm::app::ApplicationContext& ctx, const std::string& useCase) { #if NUMBER_OF_FILES > 0 auto curImIdx = ctx.Get<uint32_t>(useCase); @@ -122,7 +124,7 @@ void IncrementAppCtxIfmIdx(arm::app::ApplicationContext& ctx, std::string useCas #endif /* NUMBER_OF_FILES > 0 */ } -bool SetAppCtxIfmIdx(arm::app::ApplicationContext& ctx, uint32_t idx, std::string ctxIfmName) +bool SetAppCtxIfmIdx(arm::app::ApplicationContext& ctx, uint32_t idx, const std::string& ctxIfmName) { #if NUMBER_OF_FILES > 0 if (idx >= NUMBER_OF_FILES) { @@ -192,7 +194,7 @@ void DumpTensor(const TfLiteTensor* tensor, const size_t lineBreakForNumElements } const uint32_t tensorSz = tensor->bytes; - const uint8_t* tensorData = tflite::GetTensorData<uint8_t>(tensor); + const auto* tensorData = tflite::GetTensorData<uint8_t>(tensor); DumpTensorData(tensorData, tensorSz, lineBreakForNumElements); } |