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 ccd9cb3cc98ec6f6277c259d0f6dc35f9cb470bf..4e3bd6460817c6249bc66c195b9a3fc05d3dbef6 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 ee277f06711dc9e5b6941e3363a5f07c30dcf6b2..ee6940563459712f6d98e9cae5f5e88ac454f2e6 100755 (executable)
@@ -46,55 +46,6 @@ InferenceEngineCommon::InferenceEngineCommon() :
        mProfilerDumpType(IE_PROFILER_DUMP_MIN),
     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 61d195b90bbd18a4cef87274977b8c4630a20201..58324e597998569be6eb9445ef2e2406081753d3 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 5aa508a689d5f46368906797a41ab0b33e92d1b1..27c50040f3aeae2af0f1b46831d4d8958079f15c 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;