summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2018-04-23 10:36:24 -0700
committerMiao Wang <miaowang@google.com>2018-04-23 11:11:51 -0700
commit2dcdbd97a63fb2563b7fe9865cea8d04481a2e27 (patch)
tree82c0c501cd8cecc7d97f816835f61dd9424e64c2
parent597ec94dd22dcbecc0d1db3646c910b12ae5bb87 (diff)
downloadml-2dcdbd97a63fb2563b7fe9865cea8d04481a2e27.tar.gz
Fix the error code ANEURALNETWORKS_UNMAPPABLE
- The error codes should not clash with each other. - Change ANEURALNETWORKS_UNMAPPABLE to be of value 7. - The impact of this enum value change is expected to be minimal. Bug: 68356625 Test: make checkbuild Test: NNAPI CTS and VTS tests pass. Change-Id: I85a8b9a2180659d9057564119802d851e4011fc6
-rw-r--r--nn/common/Utils.cpp4
-rw-r--r--nn/runtime/include/NeuralNetworks.h2
2 files changed, 2 insertions, 4 deletions
diff --git a/nn/common/Utils.cpp b/nn/common/Utils.cpp
index 233cd6850..c80a4fc51 100644
--- a/nn/common/Utils.cpp
+++ b/nn/common/Utils.cpp
@@ -1467,9 +1467,7 @@ ErrorStatus convertResultCodeToErrorStatus(int resultCode) {
case ANEURALNETWORKS_INCOMPLETE:
case ANEURALNETWORKS_OP_FAILED:
case ANEURALNETWORKS_OUT_OF_MEMORY:
-#if 0
- case ANEURALNETWORKS_UNMAPPABLE: // Same as BAD_STATE per http://b/68356625
-#endif
+ case ANEURALNETWORKS_UNMAPPABLE:
return ErrorStatus::GENERAL_FAILURE;
}
}
diff --git a/nn/runtime/include/NeuralNetworks.h b/nn/runtime/include/NeuralNetworks.h
index a91219f9b..b1954b797 100644
--- a/nn/runtime/include/NeuralNetworks.h
+++ b/nn/runtime/include/NeuralNetworks.h
@@ -1570,8 +1570,8 @@ typedef enum {
ANEURALNETWORKS_UNEXPECTED_NULL = 3,
ANEURALNETWORKS_BAD_DATA = 4,
ANEURALNETWORKS_OP_FAILED = 5,
- ANEURALNETWORKS_UNMAPPABLE = 5,
ANEURALNETWORKS_BAD_STATE = 6,
+ ANEURALNETWORKS_UNMAPPABLE = 7,
} ResultCode;
/**