diff options
author | Michael Butler <butlermichael@google.com> | 2021-11-17 16:33:35 -0800 |
---|---|---|
committer | Michael Butler <butlermichael@google.com> | 2021-11-18 23:56:54 +0000 |
commit | 60a7b86cf070a9f582ef36900e463f877fa784fe (patch) | |
tree | 8b43c031effce5ea6b0b7e25d140aff21a2541dc /neuralnetworks/aidl/utils/src/Callbacks.cpp | |
parent | 34f0a8f418c45ec51bd5053e27011aed4b9b4695 (diff) |
Rename Version::ANDROID_* to kVersionFeatureLevel* -- hal
Prior to this change, version constants (e.g., Version::ANDROID_S) were
public static constants to make the version constants look as if they
were enum values. However, this method prevented versions from being
constexpr, because the Version type was incomplete by that point in
time. This change moves these version constants outside of the Version
struct, and makes them constexpr. They have the new names:
* Version::ANDROID_OC_MR1 -> kVersionFeatureLevel1
* Version::ANDROID_P -> kVersionFeatureLevel2
* Version::ANDROID_Q -> kVersionFeatureLevel3
* Version::ANDROID_R -> kVersionFeatureLevel4
* Version::ANDROID_S -> kVersionFeatureLevel5
* Version::FEATURE_LEVEL_6 -> kVersionFeatureLevel6
* Version::EXPERIMENTAL -> kVersionFeatureLevelExperimental
Bug: 206975939
Test: mma
Change-Id: Ibf5f2fdb1459a69c51865aa5fdcd0cb0c3a88ade
Diffstat (limited to 'neuralnetworks/aidl/utils/src/Callbacks.cpp')
-rw-r--r-- | neuralnetworks/aidl/utils/src/Callbacks.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/neuralnetworks/aidl/utils/src/Callbacks.cpp b/neuralnetworks/aidl/utils/src/Callbacks.cpp index a32147734c..8084970690 100644 --- a/neuralnetworks/aidl/utils/src/Callbacks.cpp +++ b/neuralnetworks/aidl/utils/src/Callbacks.cpp @@ -35,7 +35,8 @@ namespace { // Converts the results of IDevice::prepareModel* to the NN canonical format. On success, this // function returns with a non-null nn::SharedPreparedModel with a feature level of -// nn::Version::ANDROID_S. On failure, this function returns with the appropriate nn::GeneralError. +// nn::kVersionFeatureLevel5. On failure, this function returns with the appropriate +// nn::GeneralError. nn::GeneralResult<nn::SharedPreparedModel> prepareModelCallback( ErrorStatus status, const std::shared_ptr<IPreparedModel>& preparedModel) { HANDLE_STATUS_AIDL(status) << "model preparation failed with " << toString(status); |