Lines Matching refs:hal
39 class SampleBuffer : public hal::IBuffer {
46 hal::Return<hal::ErrorStatus> copyTo(const hal::hidl_memory& dst) override;
47 hal::Return<hal::ErrorStatus> copyFrom(const hal::hidl_memory& src,
48 const hal::hidl_vec<uint32_t>& dimensions) override;
60 class SampleDriver : public hal::IDevice {
69 hal::Return<void> getCapabilities(getCapabilities_cb cb) override;
70 hal::Return<void> getCapabilities_1_1(getCapabilities_1_1_cb cb) override;
71 hal::Return<void> getCapabilities_1_2(getCapabilities_1_2_cb cb) override;
72 hal::Return<void> getVersionString(getVersionString_cb cb) override;
73 hal::Return<void> getType(getType_cb cb) override;
74 hal::Return<void> getSupportedExtensions(getSupportedExtensions_cb) override;
75 hal::Return<void> getSupportedOperations(const hal::V1_0::Model& model,
77 hal::Return<void> getSupportedOperations_1_1(const hal::V1_1::Model& model,
79 hal::Return<void> getSupportedOperations_1_2(const hal::V1_2::Model& model,
81 hal::Return<void> getNumberOfCacheFilesNeeded(getNumberOfCacheFilesNeeded_cb cb) override;
82 hal::Return<hal::V1_0::ErrorStatus> prepareModel(
83 const hal::V1_0::Model& model,
84 const sp<hal::V1_0::IPreparedModelCallback>& callback) override;
85 hal::Return<hal::V1_0::ErrorStatus> prepareModel_1_1(
86 const hal::V1_1::Model& model, hal::ExecutionPreference preference,
87 const sp<hal::V1_0::IPreparedModelCallback>& callback) override;
88 hal::Return<hal::V1_0::ErrorStatus> prepareModel_1_2(
89 const hal::V1_2::Model& model, hal::ExecutionPreference preference,
90 const hal::hidl_vec<hal::hidl_handle>& modelCache,
91 const hal::hidl_vec<hal::hidl_handle>& dataCache, const hal::CacheToken& token,
92 const sp<hal::V1_2::IPreparedModelCallback>& callback) override;
93 hal::Return<hal::V1_3::ErrorStatus> prepareModel_1_3(
94 const hal::V1_3::Model& model, hal::ExecutionPreference preference,
95 hal::Priority priority, const hal::OptionalTimePoint& deadline,
96 const hal::hidl_vec<hal::hidl_handle>& modelCache,
97 const hal::hidl_vec<hal::hidl_handle>& dataCache, const hal::CacheToken& token,
98 const sp<hal::V1_3::IPreparedModelCallback>& callback) override;
99 hal::Return<hal::V1_0::ErrorStatus> prepareModelFromCache(
100 const hal::hidl_vec<hal::hidl_handle>& modelCache,
101 const hal::hidl_vec<hal::hidl_handle>& dataCache, const hal::CacheToken& token,
102 const sp<hal::V1_2::IPreparedModelCallback>& callback) override;
103 hal::Return<hal::V1_3::ErrorStatus> prepareModelFromCache_1_3(
104 const hal::OptionalTimePoint& deadline,
105 const hal::hidl_vec<hal::hidl_handle>& modelCache,
106 const hal::hidl_vec<hal::hidl_handle>& dataCache, const hal::CacheToken& token,
107 const sp<hal::V1_3::IPreparedModelCallback>& callback) override;
108 hal::Return<hal::DeviceStatus> getStatus() override;
109 hal::Return<void> allocate(const hal::V1_3::BufferDesc& desc,
110 const hal::hidl_vec<sp<hal::V1_3::IPreparedModel>>& preparedModels,
111 const hal::hidl_vec<hal::V1_3::BufferRole>& inputRoles,
112 const hal::hidl_vec<hal::V1_3::BufferRole>& outputRoles,
128 class SamplePreparedModel : public hal::IPreparedModel {
130 SamplePreparedModel(const hal::Model& model, const SampleDriver* driver, in SamplePreparedModel()
131 hal::ExecutionPreference preference, uid_t userId, hal::Priority priority) in SamplePreparedModel()
141 hal::Return<hal::V1_0::ErrorStatus> execute(
142 const hal::V1_0::Request& request,
143 const sp<hal::V1_0::IExecutionCallback>& callback) override;
144 hal::Return<hal::V1_0::ErrorStatus> execute_1_2(
145 const hal::V1_0::Request& request, hal::MeasureTiming measure,
146 const sp<hal::V1_2::IExecutionCallback>& callback) override;
147 hal::Return<hal::V1_3::ErrorStatus> execute_1_3(
148 const hal::V1_3::Request& request, hal::MeasureTiming measure,
149 const hal::OptionalTimePoint& deadline,
150 const hal::OptionalTimeoutDuration& loopTimeoutDuration,
151 const sp<hal::V1_3::IExecutionCallback>& callback) override;
152 hal::Return<void> executeSynchronously(const hal::V1_0::Request& request,
153 hal::MeasureTiming measure,
155 hal::Return<void> executeSynchronously_1_3(
156 const hal::V1_3::Request& request, hal::MeasureTiming measure,
157 const hal::OptionalTimePoint& deadline,
158 const hal::OptionalTimeoutDuration& loopTimeoutDuration,
160 hal::Return<void> configureExecutionBurst(
161 const sp<hal::V1_2::IBurstCallback>& callback,
162 const MQDescriptorSync<hal::V1_2::FmqRequestDatum>& requestChannel,
163 const MQDescriptorSync<hal::V1_2::FmqResultDatum>& resultChannel,
165 hal::Return<void> executeFenced(const hal::Request& request,
166 const hal::hidl_vec<hal::hidl_handle>& wait_for,
167 hal::MeasureTiming measure,
168 const hal::OptionalTimePoint& deadline,
169 const hal::OptionalTimeoutDuration& loopTimeoutDuration,
170 const hal::OptionalTimeoutDuration& duration,
172 const hal::Model* getModel() const { return &mModel; } in getModel()
175 hal::Model mModel;
178 const hal::ExecutionPreference kPreference;
180 const hal::Priority kPriority;
183 class SampleFencedExecutionCallback : public hal::IFencedExecutionCallback {
185 SampleFencedExecutionCallback(hal::Timing timingSinceLaunch, hal::Timing timingAfterFence, in SampleFencedExecutionCallback()
186 hal::ErrorStatus error) in SampleFencedExecutionCallback()
190 hal::Return<void> getExecutionInfo(getExecutionInfo_cb callback) override { in getExecutionInfo()
192 return hal::Void(); in getExecutionInfo()
196 const hal::Timing kTimingSinceLaunch;
197 const hal::Timing kTimingAfterFence;
198 const hal::ErrorStatus kErrorStatus;