From: Inki Dae Date: Fri, 8 May 2020 06:29:45 +0000 (+0900) Subject: Clean up constructor functions X-Git-Tag: submit/tizen/20200602.011936~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F88%2F232888%2F1;p=platform%2Fcore%2Fmultimedia%2Finference-engine-interface.git Clean up constructor functions Constructor function of InferenceEngineCommon class doesn't need any parameter so drop other unused functions. Change-Id: Icb806d10050b55456929b6bca5e2901fee2b0354 Signed-off-by: Inki Dae --- diff --git a/include/inference_engine_common_impl.h b/include/inference_engine_common_impl.h index ccd9cb3..4e3bd64 100755 --- a/include/inference_engine_common_impl.h +++ b/include/inference_engine_common_impl.h @@ -32,29 +32,8 @@ namespace Common { class InferenceEngineCommon { public: - /** - * Deprecated. - */ InferenceEngineCommon(); - /** - * Deprecated. - */ - InferenceEngineCommon(std::string backend); - - /** - * Deprecated. - */ - InferenceEngineCommon(inference_backend_type_e backend); - - /** - * @brief Intialization. - * @details Load the backend engine by dlopen() and initialize the engine by - * calling EngineCommonInit which is found by dlsym(). - * @since_tizen 6.0 - */ - InferenceEngineCommon(inference_engine_config *config); - ~InferenceEngineCommon(); diff --git a/src/inference_engine_common_impl.cpp b/src/inference_engine_common_impl.cpp index ee277f0..ee69405 100755 --- a/src/inference_engine_common_impl.cpp +++ b/src/inference_engine_common_impl.cpp @@ -46,55 +46,6 @@ InferenceEngineCommon::InferenceEngineCommon() : mProfilerDumpType(IE_PROFILER_DUMP_MIN), mBackendModule(nullptr), mBackendHandle(nullptr) -{ - LOGE("ENTER"); - - InferenceEngineInI ini; - ini.LoadInI(); - mSelectedBackendEngine = static_cast(ini.GetSelectedBackendEngine()); - SetBackendEngine(mSelectedBackendEngine); - LOGI("Backend engine is selected by ini file [%d]", mSelectedBackendEngine); - LOGE("LEAVE"); -} - -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"); -} - - -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"); LOGI("LEAVE"); diff --git a/test/src/inference_engine_profiler.cpp b/test/src/inference_engine_profiler.cpp index 61d195b..58324e5 100644 --- a/test/src/inference_engine_profiler.cpp +++ b/test/src/inference_engine_profiler.cpp @@ -81,7 +81,7 @@ TEST_P(InferenceEngineTfliteTest, Inference) .target_devices = target_devices }; - InferenceEngineCommon *engine = new InferenceEngineCommon(&config); + InferenceEngineCommon *engine = new InferenceEngineCommon(); if (engine == nullptr) { ASSERT_TRUE(engine); return; @@ -266,7 +266,7 @@ TEST_P(InferenceEngineCaffeTest, Inference) .target_devices = target_devices }; - InferenceEngineCommon *engine = new InferenceEngineCommon(&config); + InferenceEngineCommon *engine = new InferenceEngineCommon(); if (engine == nullptr) { ASSERT_TRUE(engine); return; @@ -453,7 +453,7 @@ TEST_P(InferenceEngineDldtTest, Inference) .target_devices = target_devices }; - InferenceEngineCommon *engine = new InferenceEngineCommon(&config); + InferenceEngineCommon *engine = new InferenceEngineCommon(); if (engine == nullptr) { ASSERT_TRUE(engine); return; diff --git a/test/src/inference_engine_tc.cpp b/test/src/inference_engine_tc.cpp index 5aa508a..27c5004 100644 --- a/test/src/inference_engine_tc.cpp +++ b/test/src/inference_engine_tc.cpp @@ -50,7 +50,7 @@ TEST_P(InferenceEngineTestCase_G1, Bind_P) .target_devices = target_devices }; - InferenceEngineCommon *engine = new InferenceEngineCommon(&config); + InferenceEngineCommon *engine = new InferenceEngineCommon(); ASSERT_TRUE(engine); int ret = engine->BindBackend(&config); @@ -84,7 +84,7 @@ TEST_P(InferenceEngineTestCase_G2, Load_P) .target_devices = target_devices }; - InferenceEngineCommon *engine = new InferenceEngineCommon(&config); + InferenceEngineCommon *engine = new InferenceEngineCommon(); ASSERT_TRUE(engine); int ret = engine->BindBackend(&config); @@ -154,7 +154,7 @@ TEST_P(InferenceEngineTestCase_G3, Inference) .target_devices = target_devices }; - InferenceEngineCommon *engine = new InferenceEngineCommon(&config); + InferenceEngineCommon *engine = new InferenceEngineCommon(); if (engine == nullptr) { ASSERT_TRUE(engine); return;