/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef ANDROID_FRAMEWORKS_ML_NN_COMMON_HAL_INTERFACES_H #define ANDROID_FRAMEWORKS_ML_NN_COMMON_HAL_INTERFACES_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace android::nn::hal { using android::sp; using hardware::hidl_death_recipient; using hardware::hidl_enum_range; using hardware::hidl_handle; using hardware::hidl_memory; using hardware::hidl_string; using hardware::hidl_vec; using hardware::Return; using hardware::Void; using hidl::memory::V1_0::IMemory; namespace V1_0 = hardware::neuralnetworks::V1_0; namespace V1_1 = hardware::neuralnetworks::V1_1; namespace V1_2 = hardware::neuralnetworks::V1_2; namespace V1_3 = hardware::neuralnetworks::V1_3; using V1_0::DataLocation; using V1_0::DeviceStatus; using V1_0::FusedActivationFunc; using V1_0::PerformanceInfo; using V1_0::RequestArgument; using V1_1::ExecutionPreference; using V1_2::Constant; using V1_2::DeviceType; using V1_2::Extension; using V1_2::MeasureTiming; using V1_2::OutputShape; using V1_2::SymmPerChannelQuantParams; using V1_2::Timing; using V1_3::BufferDesc; using V1_3::BufferRole; using V1_3::Capabilities; using V1_3::ErrorStatus; using V1_3::IBuffer; using V1_3::IDevice; using V1_3::IExecutionCallback; using V1_3::IFencedExecutionCallback; using V1_3::IPreparedModel; using V1_3::IPreparedModelCallback; using V1_3::LoopTimeoutDurationNs; using V1_3::Model; using V1_3::Operand; using V1_3::OperandLifeTime; using V1_3::OperandType; using V1_3::OperandTypeRange; using V1_3::Operation; using V1_3::OperationType; using V1_3::OperationTypeRange; using V1_3::OptionalTimeoutDuration; using V1_3::OptionalTimePoint; using V1_3::Priority; using V1_3::Request; using V1_3::Subgraph; using ExtensionNameAndPrefix = V1_2::Model::ExtensionNameAndPrefix; using ExtensionTypeEncoding = V1_2::Model::ExtensionTypeEncoding; using OperandExtraParams = V1_2::Operand::ExtraParams; using CacheToken = hardware::hidl_array(Constant::BYTE_SIZE_OF_CACHE_TOKEN)>; using DeviceFactory = std::function(bool blocking)>; using ModelFactory = std::function; inline constexpr Priority kDefaultPriority = Priority::MEDIUM; } // namespace android::nn::hal #endif // ANDROID_FRAMEWORKS_ML_NN_COMMON_HAL_INTERFACES_H