18#include "kernels/Utils.h"
25template <
typename T>
void resetZeros(T *out,
const int num_elements)
29 out[i] =
static_cast<T
>(0);
40 Tensor::element_type(kernel.
output()));
42 Tensor::num_elements(kernel.
output()));
58 output_data =
const_cast<uint8_t *
>(input_data);
64 switch (Tensor::element_type(kernel.
input()))
67 case DataType::FLOAT32:
69 resetZeros(kernels::getTensorData<float>(output_data), flat_size);
74 assert(
false &&
"Unsupported type");
void makeInplaceOperation(const circle::Tensor *src_tensor, const circle::Tensor *dst_tensor)
bool is_inplace_op(const circle::Operator *op)
uint8_t * getDataByTensor(const circle::Tensor *raw_tensor)
const circle::Tensor * output() const
const circle::Tensor * input() const
#define LUCI_INTERPRETER_CHECK(cond)
luci_interpreter::RuntimeShape getTensorRuntimeShape(const circle::Tensor *circle_tensor, BaseRuntimeGraph *runtime_graph)
void execute_kernel_CircleZerosLike(const circle::Operator *cur_op, BaseRuntimeGraph *runtime_graph)
void configure_kernel_CircleZerosLike(const circle::Operator *cur_op, BaseRuntimeGraph *runtime_graph)
uint32_t num_elements(const Shape &shape)
The number of elements of a feature map of a given shape.