31constexpr uint32_t inputTensorIdx = 0;
43 const circle::Tensor *
input =
nullptr;
44 const circle::Tensor *
output =
nullptr;
52 runtime_kernel.
readKernel(op_index, runtime_context);
57 assert(input !=
nullptr);
58 assert(output !=
nullptr);
60 status = runtime_kernel.
getDataFromStorage(op_index, runtime_storage, runtime_context);
67 assert(input_data !=
nullptr);
68 assert(output_data !=
nullptr);
70 switch (
input->type())
73 case circle::TensorType_FLOAT32:
78 const auto *input_data_float = core::utils::castInputData<float>(input_data);
79 auto *output_data_float = core::utils::castOutputData<float>(output_data);
81 assert(output_data_float);
82 const int flat_size = input_shape.flatSize();
84 status =
pal::Elu(flat_size, input_data_float, output_data_float);
91 assert(
false &&
"Unsupported type.");
uint8_t * outputs_data[maxOutputSize]
OMStatus getDataFromStorage(uint16_t op_index, core::OMRuntimeStorage &storage, core::OMRuntimeContext &context)
uint8_t * inputs_data[maxInputSize]
OMStatus readKernel(uint16_t op_index, core::OMRuntimeContext &runtime_context)
const circle::Tensor * outputs[maxOutputSize]
const circle::Tensor * inputs[maxInputSize]
const luci_interpreter::RuntimeShape output_shape
constexpr uint32_t outputTensorIdx
OMStatus Elu(const int flat_size, const float *input_data, float *output_data)
core::OMRuntimeContext & runtime_context
core::OMRuntimeStorage & runtime_storage