blob: 3200d7a2cf1bd49e268c2758d1328ad04bcbe4a5 [file] [log] [blame]
#ifndef HIDL_GENERATED_ANDROID_HARDWARE_NEURALNETWORKS_V1_3_BSPREPAREDMODEL_H
#define HIDL_GENERATED_ANDROID_HARDWARE_NEURALNETWORKS_V1_3_BSPREPAREDMODEL_H
#include <android-base/macros.h>
#include <cutils/trace.h>
#include <future>
#include <android/hardware/neuralnetworks/1.3/IPreparedModel.h>
#include <hidl/HidlPassthroughSupport.h>
#include <hidl/TaskRunner.h>
namespace android {
namespace hardware {
namespace neuralnetworks {
namespace V1_3 {
struct BsPreparedModel : IPreparedModel, ::android::hardware::details::HidlInstrumentor {
explicit BsPreparedModel(const ::android::sp<IPreparedModel> impl);
/**
* The pure class is what this class wraps.
*/
typedef IPreparedModel Pure;
typedef ::android::hardware::details::bs_tag _hidl_tag;
// Methods from ::android::hardware::neuralnetworks::V1_0::IPreparedModel follow.
::android::hardware::Return<::android::hardware::neuralnetworks::V1_0::ErrorStatus> execute(const ::android::hardware::neuralnetworks::V1_0::Request& request, const ::android::sp<::android::hardware::neuralnetworks::V1_0::IExecutionCallback>& callback) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPreparedModel::execute::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&request);
_hidl_args.push_back((void *)&callback);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.neuralnetworks", "1.0", "IPreparedModel", "execute", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::sp<::android::hardware::neuralnetworks::V1_0::IExecutionCallback> _hidl_wrapped_callback;
if (callback != nullptr && !callback->isRemote()) {
_hidl_wrapped_callback = ::android::hardware::details::wrapPassthrough(callback);
if (_hidl_wrapped_callback == nullptr) {
return ::android::hardware::Status::fromExceptionCode(
::android::hardware::Status::EX_TRANSACTION_FAILED,
"Cannot wrap passthrough interface.");
}
} else {
_hidl_wrapped_callback = callback;
}
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->execute(request, _hidl_wrapped_callback);
::android::hardware::neuralnetworks::V1_0::ErrorStatus _hidl_out_status = _hidl_return;
(void) _hidl_out_status;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.neuralnetworks", "1.0", "IPreparedModel", "execute", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
// Methods from ::android::hardware::neuralnetworks::V1_2::IPreparedModel follow.
::android::hardware::Return<::android::hardware::neuralnetworks::V1_0::ErrorStatus> execute_1_2(const ::android::hardware::neuralnetworks::V1_0::Request& request, ::android::hardware::neuralnetworks::V1_2::MeasureTiming measure, const ::android::sp<::android::hardware::neuralnetworks::V1_2::IExecutionCallback>& callback) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPreparedModel::execute_1_2::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&request);
_hidl_args.push_back((void *)&measure);
_hidl_args.push_back((void *)&callback);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.neuralnetworks", "1.2", "IPreparedModel", "execute_1_2", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::sp<::android::hardware::neuralnetworks::V1_2::IExecutionCallback> _hidl_wrapped_callback;
if (callback != nullptr && !callback->isRemote()) {
_hidl_wrapped_callback = ::android::hardware::details::wrapPassthrough(callback);
if (_hidl_wrapped_callback == nullptr) {
return ::android::hardware::Status::fromExceptionCode(
::android::hardware::Status::EX_TRANSACTION_FAILED,
"Cannot wrap passthrough interface.");
}
} else {
_hidl_wrapped_callback = callback;
}
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->execute_1_2(request, measure, _hidl_wrapped_callback);
::android::hardware::neuralnetworks::V1_0::ErrorStatus _hidl_out_status = _hidl_return;
(void) _hidl_out_status;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.neuralnetworks", "1.2", "IPreparedModel", "execute_1_2", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> executeSynchronously(const ::android::hardware::neuralnetworks::V1_0::Request& request, ::android::hardware::neuralnetworks::V1_2::MeasureTiming measure, executeSynchronously_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPreparedModel::executeSynchronously::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&request);
_hidl_args.push_back((void *)&measure);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.neuralnetworks", "1.2", "IPreparedModel", "executeSynchronously", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->executeSynchronously(request, measure, [&](const auto &_hidl_out_status, const auto &_hidl_out_outputShapes, const auto &_hidl_out_timing) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
_hidl_args.push_back((void *)&_hidl_out_outputShapes);
_hidl_args.push_back((void *)&_hidl_out_timing);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.neuralnetworks", "1.2", "IPreparedModel", "executeSynchronously", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_status, _hidl_out_outputShapes, _hidl_out_timing);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> configureExecutionBurst(const ::android::sp<::android::hardware::neuralnetworks::V1_2::IBurstCallback>& callback, const ::android::hardware::MQDescriptorSync<::android::hardware::neuralnetworks::V1_2::FmqRequestDatum>& requestChannel, const ::android::hardware::MQDescriptorSync<::android::hardware::neuralnetworks::V1_2::FmqResultDatum>& resultChannel, configureExecutionBurst_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPreparedModel::configureExecutionBurst::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&callback);
_hidl_args.push_back((void *)&requestChannel);
_hidl_args.push_back((void *)&resultChannel);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.neuralnetworks", "1.2", "IPreparedModel", "configureExecutionBurst", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::sp<::android::hardware::neuralnetworks::V1_2::IBurstCallback> _hidl_wrapped_callback;
if (callback != nullptr && !callback->isRemote()) {
_hidl_wrapped_callback = ::android::hardware::details::wrapPassthrough(callback);
if (_hidl_wrapped_callback == nullptr) {
return ::android::hardware::Status::fromExceptionCode(
::android::hardware::Status::EX_TRANSACTION_FAILED,
"Cannot wrap passthrough interface.");
}
} else {
_hidl_wrapped_callback = callback;
}
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->configureExecutionBurst(_hidl_wrapped_callback, requestChannel, resultChannel, [&](const auto &_hidl_out_status, const auto &_hidl_out_context) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
_hidl_args.push_back((void *)&_hidl_out_context);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.neuralnetworks", "1.2", "IPreparedModel", "configureExecutionBurst", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::sp<::android::hardware::neuralnetworks::V1_2::IBurstContext> _hidl_wrapped__hidl_out_context;
if (_hidl_out_context != nullptr && !_hidl_out_context->isRemote()) {
_hidl_wrapped__hidl_out_context = ::android::hardware::details::wrapPassthrough(_hidl_out_context);
if (_hidl_wrapped__hidl_out_context == nullptr) {
_hidl_error = ::android::hardware::Status::fromExceptionCode(
::android::hardware::Status::EX_TRANSACTION_FAILED,
"Cannot wrap passthrough interface.");
}
} else {
_hidl_wrapped__hidl_out_context = _hidl_out_context;
}
_hidl_cb(_hidl_out_status, _hidl_wrapped__hidl_out_context);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
// Methods from ::android::hardware::neuralnetworks::V1_3::IPreparedModel follow.
::android::hardware::Return<::android::hardware::neuralnetworks::V1_3::ErrorStatus> execute_1_3(const ::android::hardware::neuralnetworks::V1_3::Request& request, ::android::hardware::neuralnetworks::V1_2::MeasureTiming measure, const ::android::hardware::neuralnetworks::V1_3::OptionalTimePoint& deadline, const ::android::hardware::neuralnetworks::V1_3::OptionalTimeoutDuration& loopTimeoutDuration, const ::android::sp<::android::hardware::neuralnetworks::V1_3::IExecutionCallback>& callback) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPreparedModel::execute_1_3::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&request);
_hidl_args.push_back((void *)&measure);
_hidl_args.push_back((void *)&deadline);
_hidl_args.push_back((void *)&loopTimeoutDuration);
_hidl_args.push_back((void *)&callback);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.neuralnetworks", "1.3", "IPreparedModel", "execute_1_3", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::sp<::android::hardware::neuralnetworks::V1_3::IExecutionCallback> _hidl_wrapped_callback;
if (callback != nullptr && !callback->isRemote()) {
_hidl_wrapped_callback = ::android::hardware::details::wrapPassthrough(callback);
if (_hidl_wrapped_callback == nullptr) {
return ::android::hardware::Status::fromExceptionCode(
::android::hardware::Status::EX_TRANSACTION_FAILED,
"Cannot wrap passthrough interface.");
}
} else {
_hidl_wrapped_callback = callback;
}
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->execute_1_3(request, measure, deadline, loopTimeoutDuration, _hidl_wrapped_callback);
::android::hardware::neuralnetworks::V1_3::ErrorStatus _hidl_out_status = _hidl_return;
(void) _hidl_out_status;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.neuralnetworks", "1.3", "IPreparedModel", "execute_1_3", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> executeSynchronously_1_3(const ::android::hardware::neuralnetworks::V1_3::Request& request, ::android::hardware::neuralnetworks::V1_2::MeasureTiming measure, const ::android::hardware::neuralnetworks::V1_3::OptionalTimePoint& deadline, const ::android::hardware::neuralnetworks::V1_3::OptionalTimeoutDuration& loopTimeoutDuration, executeSynchronously_1_3_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPreparedModel::executeSynchronously_1_3::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&request);
_hidl_args.push_back((void *)&measure);
_hidl_args.push_back((void *)&deadline);
_hidl_args.push_back((void *)&loopTimeoutDuration);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.neuralnetworks", "1.3", "IPreparedModel", "executeSynchronously_1_3", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->executeSynchronously_1_3(request, measure, deadline, loopTimeoutDuration, [&](const auto &_hidl_out_status, const auto &_hidl_out_outputShapes, const auto &_hidl_out_timing) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
_hidl_args.push_back((void *)&_hidl_out_outputShapes);
_hidl_args.push_back((void *)&_hidl_out_timing);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.neuralnetworks", "1.3", "IPreparedModel", "executeSynchronously_1_3", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_status, _hidl_out_outputShapes, _hidl_out_timing);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> executeFenced(const ::android::hardware::neuralnetworks::V1_3::Request& request, const ::android::hardware::hidl_vec<::android::hardware::hidl_handle>& waitFor, ::android::hardware::neuralnetworks::V1_2::MeasureTiming measure, const ::android::hardware::neuralnetworks::V1_3::OptionalTimePoint& deadline, const ::android::hardware::neuralnetworks::V1_3::OptionalTimeoutDuration& loopTimeoutDuration, const ::android::hardware::neuralnetworks::V1_3::OptionalTimeoutDuration& duration, executeFenced_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPreparedModel::executeFenced::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&request);
_hidl_args.push_back((void *)&waitFor);
_hidl_args.push_back((void *)&measure);
_hidl_args.push_back((void *)&deadline);
_hidl_args.push_back((void *)&loopTimeoutDuration);
_hidl_args.push_back((void *)&duration);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.neuralnetworks", "1.3", "IPreparedModel", "executeFenced", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->executeFenced(request, waitFor, measure, deadline, loopTimeoutDuration, duration, [&](const auto &_hidl_out_status, const auto &_hidl_out_syncFence, const auto &_hidl_out_callback) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_status);
_hidl_args.push_back((void *)&_hidl_out_syncFence);
_hidl_args.push_back((void *)&_hidl_out_callback);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.neuralnetworks", "1.3", "IPreparedModel", "executeFenced", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::sp<::android::hardware::neuralnetworks::V1_3::IFencedExecutionCallback> _hidl_wrapped__hidl_out_callback;
if (_hidl_out_callback != nullptr && !_hidl_out_callback->isRemote()) {
_hidl_wrapped__hidl_out_callback = ::android::hardware::details::wrapPassthrough(_hidl_out_callback);
if (_hidl_wrapped__hidl_out_callback == nullptr) {
_hidl_error = ::android::hardware::Status::fromExceptionCode(
::android::hardware::Status::EX_TRANSACTION_FAILED,
"Cannot wrap passthrough interface.");
}
} else {
_hidl_wrapped__hidl_out_callback = _hidl_out_callback;
}
_hidl_cb(_hidl_out_status, _hidl_out_syncFence, _hidl_wrapped__hidl_out_callback);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
// Methods from ::android::hidl::base::V1_0::IBase follow.
::android::hardware::Return<void> interfaceChain(interfaceChain_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPreparedModel::interfaceChain::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "interfaceChain", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->interfaceChain([&](const auto &_hidl_out_descriptors) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_descriptors);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "interfaceChain", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_descriptors);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> debug(const ::android::hardware::hidl_handle& fd, const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& options) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPreparedModel::debug::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&fd);
_hidl_args.push_back((void *)&options);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "debug", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->debug(fd, options);
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "debug", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> interfaceDescriptor(interfaceDescriptor_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPreparedModel::interfaceDescriptor::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "interfaceDescriptor", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->interfaceDescriptor([&](const auto &_hidl_out_descriptor) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_descriptor);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "interfaceDescriptor", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_descriptor);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getHashChain(getHashChain_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPreparedModel::getHashChain::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "getHashChain", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getHashChain([&](const auto &_hidl_out_hashchain) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_hashchain);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "getHashChain", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_hashchain);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> setHALInstrumentation() override {
configureInstrumentation();
return ::android::hardware::Void();
}
::android::hardware::Return<bool> linkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient, uint64_t cookie) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPreparedModel::linkToDeath::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&recipient);
_hidl_args.push_back((void *)&cookie);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "linkToDeath", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->linkToDeath(recipient, cookie);
bool _hidl_out_success = _hidl_return;
(void) _hidl_out_success;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_success);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "linkToDeath", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> ping() override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPreparedModel::ping::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "ping", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->ping();
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "ping", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> getDebugInfo(getDebugInfo_cb _hidl_cb) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPreparedModel::getDebugInfo::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "getDebugInfo", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->getDebugInfo([&](const auto &_hidl_out_info) {
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_info);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "getDebugInfo", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
_hidl_cb(_hidl_out_info);
});
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
::android::hardware::Return<void> notifySyspropsChanged() override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPreparedModel::notifySyspropsChanged::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "notifySyspropsChanged", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = addOnewayTask([mImpl = this->mImpl
#ifdef __ANDROID_DEBUGGABLE__
, mEnableInstrumentation = this->mEnableInstrumentation, mInstrumentationCallbacks = this->mInstrumentationCallbacks
#endif // __ANDROID_DEBUGGABLE__
] {
mImpl->notifySyspropsChanged();
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "notifySyspropsChanged", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
});
return _hidl_return;
}
::android::hardware::Return<bool> unlinkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient) override {
atrace_begin(ATRACE_TAG_HAL, "HIDL::IPreparedModel::unlinkToDeath::passthrough");
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&recipient);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "unlinkToDeath", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
::android::hardware::Status _hidl_error = ::android::hardware::Status::ok();
auto _hidl_return = mImpl->unlinkToDeath(recipient);
bool _hidl_out_success = _hidl_return;
(void) _hidl_out_success;
atrace_end(ATRACE_TAG_HAL);
#ifdef __ANDROID_DEBUGGABLE__
if (UNLIKELY(mEnableInstrumentation)) {
std::vector<void *> _hidl_args;
_hidl_args.push_back((void *)&_hidl_out_success);
for (const auto &callback: mInstrumentationCallbacks) {
callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "unlinkToDeath", &_hidl_args);
}
}
#endif // __ANDROID_DEBUGGABLE__
if (!_hidl_error.isOk()) return _hidl_error;
return _hidl_return;
}
private:
const ::android::sp<IPreparedModel> mImpl;
::android::hardware::details::TaskRunner mOnewayQueue;
::android::hardware::Return<void> addOnewayTask(std::function<void(void)>);
};
} // namespace V1_3
} // namespace neuralnetworks
} // namespace hardware
} // namespace android
#endif // HIDL_GENERATED_ANDROID_HARDWARE_NEURALNETWORKS_V1_3_BSPREPAREDMODEL_H