Loading neuralnetworks/1.0/utils/include/nnapi/hal/1.0/Utils.h +2 −2 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ namespace android::hardware::neuralnetworks::V1_0::utils { constexpr auto kVersion = nn::Version::ANDROID_OC_MR1; const auto kVersion = nn::Version::ANDROID_OC_MR1; template <typename Type> nn::Result<void> validate(const Type& halObject) { Loading @@ -51,7 +51,7 @@ bool valid(const Type& halObject) { template <typename Type> nn::Result<void> compliantVersion(const Type& canonical) { const auto version = NN_TRY(nn::validate(canonical)); if (version > kVersion) { if (!nn::isCompliantVersion(version, kVersion)) { return NN_ERROR() << "Insufficient version: " << version << " vs required " << kVersion; } return {}; Loading neuralnetworks/1.1/utils/include/nnapi/hal/1.1/Utils.h +2 −2 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ namespace android::hardware::neuralnetworks::V1_1::utils { constexpr auto kDefaultExecutionPreference = ExecutionPreference::FAST_SINGLE_ANSWER; constexpr auto kVersion = nn::Version::ANDROID_P; const auto kVersion = nn::Version::ANDROID_P; template <typename Type> nn::Result<void> validate(const Type& halObject) { Loading @@ -53,7 +53,7 @@ bool valid(const Type& halObject) { template <typename Type> nn::Result<void> compliantVersion(const Type& canonical) { const auto version = NN_TRY(nn::validate(canonical)); if (version > kVersion) { if (!nn::isCompliantVersion(version, kVersion)) { return NN_ERROR() << "Insufficient version: " << version << " vs required " << kVersion; } return {}; Loading neuralnetworks/1.2/utils/include/nnapi/hal/1.2/Utils.h +2 −2 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ using V1_1::utils::kDefaultExecutionPreference; constexpr auto kDefaultMesaureTiming = MeasureTiming::NO; constexpr auto kNoTiming = Timing{.timeOnDevice = std::numeric_limits<uint64_t>::max(), .timeInDriver = std::numeric_limits<uint64_t>::max()}; constexpr auto kVersion = nn::Version::ANDROID_Q; const auto kVersion = nn::Version::ANDROID_Q; template <typename Type> nn::Result<void> validate(const Type& halObject) { Loading @@ -62,7 +62,7 @@ bool valid(const Type& halObject) { template <typename Type> nn::Result<void> compliantVersion(const Type& canonical) { const auto version = NN_TRY(nn::validate(canonical)); if (version > kVersion) { if (!nn::isCompliantVersion(version, kVersion)) { return NN_ERROR() << "Insufficient version: " << version << " vs required " << kVersion; } return {}; Loading neuralnetworks/1.2/utils/src/Burst.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -315,7 +315,7 @@ nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> Burst:: // if the request is valid but of a higher version than what's supported in burst execution, // fall back to another execution path if (const auto version = NN_TRY(nn::validate(request)); version > nn::Version::ANDROID_Q) { if (!compliantVersion(request).ok()) { // fallback to another execution path if the packet could not be sent return kPreparedModel->execute(request, measure, deadline, loopTimeoutDuration); } Loading Loading @@ -359,7 +359,7 @@ nn::GeneralResult<nn::SharedExecution> Burst::createReusableExecution( // if the request is valid but of a higher version than what's supported in burst execution, // fall back to another execution path if (const auto version = NN_TRY(nn::validate(request)); version > nn::Version::ANDROID_Q) { if (!compliantVersion(request).ok()) { // fallback to another execution path if the packet could not be sent return kPreparedModel->createReusableExecution(request, measure, loopTimeoutDuration); } Loading neuralnetworks/1.3/utils/include/nnapi/hal/1.3/Utils.h +2 −2 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ using V1_2::utils::kDefaultMesaureTiming; using V1_2::utils::kNoTiming; constexpr auto kDefaultPriority = Priority::MEDIUM; constexpr auto kVersion = nn::Version::ANDROID_R; const auto kVersion = nn::Version::ANDROID_R; template <typename Type> nn::Result<void> validate(const Type& halObject) { Loading @@ -62,7 +62,7 @@ bool valid(const Type& halObject) { template <typename Type> nn::Result<void> compliantVersion(const Type& canonical) { const auto version = NN_TRY(nn::validate(canonical)); if (version > kVersion) { if (!nn::isCompliantVersion(version, kVersion)) { return NN_ERROR() << "Insufficient version: " << version << " vs required " << kVersion; } return {}; Loading Loading
neuralnetworks/1.0/utils/include/nnapi/hal/1.0/Utils.h +2 −2 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ namespace android::hardware::neuralnetworks::V1_0::utils { constexpr auto kVersion = nn::Version::ANDROID_OC_MR1; const auto kVersion = nn::Version::ANDROID_OC_MR1; template <typename Type> nn::Result<void> validate(const Type& halObject) { Loading @@ -51,7 +51,7 @@ bool valid(const Type& halObject) { template <typename Type> nn::Result<void> compliantVersion(const Type& canonical) { const auto version = NN_TRY(nn::validate(canonical)); if (version > kVersion) { if (!nn::isCompliantVersion(version, kVersion)) { return NN_ERROR() << "Insufficient version: " << version << " vs required " << kVersion; } return {}; Loading
neuralnetworks/1.1/utils/include/nnapi/hal/1.1/Utils.h +2 −2 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ namespace android::hardware::neuralnetworks::V1_1::utils { constexpr auto kDefaultExecutionPreference = ExecutionPreference::FAST_SINGLE_ANSWER; constexpr auto kVersion = nn::Version::ANDROID_P; const auto kVersion = nn::Version::ANDROID_P; template <typename Type> nn::Result<void> validate(const Type& halObject) { Loading @@ -53,7 +53,7 @@ bool valid(const Type& halObject) { template <typename Type> nn::Result<void> compliantVersion(const Type& canonical) { const auto version = NN_TRY(nn::validate(canonical)); if (version > kVersion) { if (!nn::isCompliantVersion(version, kVersion)) { return NN_ERROR() << "Insufficient version: " << version << " vs required " << kVersion; } return {}; Loading
neuralnetworks/1.2/utils/include/nnapi/hal/1.2/Utils.h +2 −2 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ using V1_1::utils::kDefaultExecutionPreference; constexpr auto kDefaultMesaureTiming = MeasureTiming::NO; constexpr auto kNoTiming = Timing{.timeOnDevice = std::numeric_limits<uint64_t>::max(), .timeInDriver = std::numeric_limits<uint64_t>::max()}; constexpr auto kVersion = nn::Version::ANDROID_Q; const auto kVersion = nn::Version::ANDROID_Q; template <typename Type> nn::Result<void> validate(const Type& halObject) { Loading @@ -62,7 +62,7 @@ bool valid(const Type& halObject) { template <typename Type> nn::Result<void> compliantVersion(const Type& canonical) { const auto version = NN_TRY(nn::validate(canonical)); if (version > kVersion) { if (!nn::isCompliantVersion(version, kVersion)) { return NN_ERROR() << "Insufficient version: " << version << " vs required " << kVersion; } return {}; Loading
neuralnetworks/1.2/utils/src/Burst.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -315,7 +315,7 @@ nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>> Burst:: // if the request is valid but of a higher version than what's supported in burst execution, // fall back to another execution path if (const auto version = NN_TRY(nn::validate(request)); version > nn::Version::ANDROID_Q) { if (!compliantVersion(request).ok()) { // fallback to another execution path if the packet could not be sent return kPreparedModel->execute(request, measure, deadline, loopTimeoutDuration); } Loading Loading @@ -359,7 +359,7 @@ nn::GeneralResult<nn::SharedExecution> Burst::createReusableExecution( // if the request is valid but of a higher version than what's supported in burst execution, // fall back to another execution path if (const auto version = NN_TRY(nn::validate(request)); version > nn::Version::ANDROID_Q) { if (!compliantVersion(request).ok()) { // fallback to another execution path if the packet could not be sent return kPreparedModel->createReusableExecution(request, measure, loopTimeoutDuration); } Loading
neuralnetworks/1.3/utils/include/nnapi/hal/1.3/Utils.h +2 −2 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ using V1_2::utils::kDefaultMesaureTiming; using V1_2::utils::kNoTiming; constexpr auto kDefaultPriority = Priority::MEDIUM; constexpr auto kVersion = nn::Version::ANDROID_R; const auto kVersion = nn::Version::ANDROID_R; template <typename Type> nn::Result<void> validate(const Type& halObject) { Loading @@ -62,7 +62,7 @@ bool valid(const Type& halObject) { template <typename Type> nn::Result<void> compliantVersion(const Type& canonical) { const auto version = NN_TRY(nn::validate(canonical)); if (version > kVersion) { if (!nn::isCompliantVersion(version, kVersion)) { return NN_ERROR() << "Insufficient version: " << version << " vs required " << kVersion; } return {}; Loading