From bd7733b39fb22f6f9ac772f453fd8ec6191c42ae Mon Sep 17 00:00:00 2001 From: Inki Dae Date: Thu, 7 May 2020 18:14:11 +0900 Subject: [PATCH] Fix UNINIT.CTOR.MANY issues Change-Id: Ieef228cea4ac43b0da154659ca408b04ab726a35 Signed-off-by: Inki Dae --- src/inference_engine_common_impl.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/inference_engine_common_impl.cpp b/src/inference_engine_common_impl.cpp index 7c5f893..ee277f0 100755 --- a/src/inference_engine_common_impl.cpp +++ b/src/inference_engine_common_impl.cpp @@ -41,10 +41,14 @@ namespace Common { InferenceEngineCommon::InferenceEngineCommon() : mSelectedBackendEngine(INFERENCE_BACKEND_NONE), + mProfiler(nullptr), + mUseProfiler(false), + mProfilerDumpType(IE_PROFILER_DUMP_MIN), mBackendModule(nullptr), mBackendHandle(nullptr) { LOGE("ENTER"); + InferenceEngineInI ini; ini.LoadInI(); mSelectedBackendEngine = static_cast(ini.GetSelectedBackendEngine()); @@ -55,20 +59,29 @@ InferenceEngineCommon::InferenceEngineCommon() : InferenceEngineCommon::InferenceEngineCommon(std::string backend) : mSelectedBackendEngine(INFERENCE_BACKEND_NONE), + mProfiler(nullptr), + mUseProfiler(false), + mProfilerDumpType(IE_PROFILER_DUMP_MIN), mBackendModule(nullptr), mBackendHandle(nullptr) { LOGE("ENTER"); + mBackendLibName = "libinference-engine-" + backend + ".so"; + LOGE("LEAVE"); } InferenceEngineCommon::InferenceEngineCommon(inference_backend_type_e backend) : mSelectedBackendEngine(INFERENCE_BACKEND_NONE), + mProfiler(nullptr), + mUseProfiler(false), + mProfilerDumpType(IE_PROFILER_DUMP_MIN), mBackendModule(nullptr), mBackendHandle(nullptr) { LOGE("ENTER"); + SetBackendEngine(backend); LOGI("Backend engine is selected by enum input[%d] set[%d]", backend, mSelectedBackendEngine); LOGE("LEAVE"); @@ -77,13 +90,13 @@ InferenceEngineCommon::InferenceEngineCommon(inference_backend_type_e backend) : InferenceEngineCommon::InferenceEngineCommon(inference_engine_config *config) : mSelectedBackendEngine(INFERENCE_BACKEND_NONE), + mProfiler(nullptr), + mUseProfiler(false), + mProfilerDumpType(IE_PROFILER_DUMP_MIN), mBackendModule(nullptr), mBackendHandle(nullptr) { LOGI("ENTER"); - - mUseProfiler = false; - LOGI("LEAVE"); } -- 2.34.1