From: Inki Dae Date: Tue, 12 May 2020 09:10:46 +0000 (+0900) Subject: Clean up target device type verification code X-Git-Tag: submit/tizen/20200602.011936~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=925b21817015aab692648b30ad967bf6ebb7322e;p=platform%2Fcore%2Fmultimedia%2Finference-engine-interface.git Clean up target device type verification code INFERENCE_TARGET_MASK definition isn't needed so drop it and use INFERENCE_TARGET_MAX instead. Change-Id: I913f29f6963be95614307e12a0c8abb381b8c1c4 Signed-off-by: Inki Dae --- diff --git a/src/inference_engine_common_impl.cpp b/src/inference_engine_common_impl.cpp index 50dac93..2afd8f1 100755 --- a/src/inference_engine_common_impl.cpp +++ b/src/inference_engine_common_impl.cpp @@ -35,7 +35,6 @@ extern "C" { #define LOG_TAG "INFERENCE_ENGINE_COMMON" } -#define INFERENCE_TARGET_TYPE_MASK (INFERENCE_TARGET_CPU | INFERENCE_TARGET_GPU | INFERENCE_TARGET_CUSTOM) #define CHECK_ENGINE_INSTANCE(object) \ if (object == nullptr) { \ LOGE("Inference engine handle is null."); \ @@ -239,7 +238,7 @@ int InferenceEngineCommon::SetTargetDevices(int types) { CHECK_ENGINE_INSTANCE(mBackendHandle); - if (INFERENCE_TARGET_NONE >= types || INFERENCE_TARGET_TYPE_MASK < types) { + if (types <= INFERENCE_TARGET_NONE || types >= INFERENCE_TARGET_MAX) { LOGE("Given target device types(%d) are invalid.", types); return INFERENCE_ENGINE_ERROR_INVALID_PARAMETER; }