Fix '!=' operator to '&' for supported_accel_devices bitwise comparison 90/262990/1
authorTae-Young Chung <ty83.chung@samsung.com>
Tue, 24 Aug 2021 08:46:39 +0000 (17:46 +0900)
committerTae-Young Chung <ty83.chung@samsung.com>
Tue, 24 Aug 2021 08:46:50 +0000 (17:46 +0900)
Change-Id: Ief7d7deebcc9e2fcac83ff98f9b01f0c40e09f38
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
mv_machine_learning/mv_inference/inference/src/Inference.cpp
packaging/capi-media-vision.spec

index e58a675..2af0f6d 100755 (executable)
@@ -544,21 +544,21 @@ namespace inference
                // Convert old type to new one.
                switch (targetType) {
                case MV_INFERENCE_TARGET_CPU:
-                       if (mBackendCapacity.supported_accel_devices != INFERENCE_TARGET_CPU) {
+                       if (!(mBackendCapacity.supported_accel_devices & INFERENCE_TARGET_CPU)) {
                                LOGE("Backend doesn't support CPU acceleration.");
                                return MEDIA_VISION_ERROR_NOT_SUPPORTED;
                        }
                        new_type = MV_INFERENCE_TARGET_DEVICE_CPU;
                        break;
                case MV_INFERENCE_TARGET_GPU:
-                       if (mBackendCapacity.supported_accel_devices != INFERENCE_TARGET_GPU) {
+                       if (!(mBackendCapacity.supported_accel_devices & INFERENCE_TARGET_GPU)) {
                                LOGE("Backend doesn't support GPU acceleration.");
                                return MEDIA_VISION_ERROR_NOT_SUPPORTED;
                        }
                        new_type = MV_INFERENCE_TARGET_DEVICE_GPU;
                        break;
                case MV_INFERENCE_TARGET_CUSTOM:
-                       if (mBackendCapacity.supported_accel_devices != INFERENCE_TARGET_CUSTOM) {
+                       if (!(mBackendCapacity.supported_accel_devices & INFERENCE_TARGET_CUSTOM)) {
                                LOGE("Backend doesn't support custom device acceleration.");
                                return MEDIA_VISION_ERROR_NOT_SUPPORTED;
                        }
index 91f4ea0..81598bc 100644 (file)
@@ -1,7 +1,7 @@
 Name:        capi-media-vision
 Summary:     Media Vision library for Tizen Native API
-Version:     0.8.10
-Release:     2
+Version:     0.8.11
+Release:     0
 Group:       Multimedia/Framework
 License:     Apache-2.0 and BSD-3-Clause
 Source0:     %{name}-%{version}.tar.gz