Clean up constructor functions 88/232888/1
authorInki Dae <inki.dae@samsung.com>
Fri, 8 May 2020 06:29:45 +0000 (15:29 +0900)
committerInki Dae <inki.dae@samsung.com>
Fri, 8 May 2020 06:29:45 +0000 (15:29 +0900)
Constructor function of InferenceEngineCommon class doesn't need
any parameter so drop other unused functions.

Change-Id: Icb806d10050b55456929b6bca5e2901fee2b0354
Signed-off-by: Inki Dae <inki.dae@samsung.com>
include/inference_engine_common_impl.h
src/inference_engine_common_impl.cpp
test/src/inference_engine_profiler.cpp
test/src/inference_engine_tc.cpp

index ccd9cb3..4e3bd64 100755 (executable)
@@ -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();
 
 
index ee277f0..ee69405 100755 (executable)
@@ -47,55 +47,6 @@ InferenceEngineCommon::InferenceEngineCommon() :
     mBackendModule(nullptr),
     mBackendHandle(nullptr)
 {
-    LOGE("ENTER");
-
-    InferenceEngineInI ini;
-    ini.LoadInI();
-    mSelectedBackendEngine = static_cast<inference_backend_type_e>(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");
 }
index 61d195b..58324e5 100644 (file)
@@ -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;
index 5aa508a..27c5004 100644 (file)
@@ -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;