20#include "kernels/Utils.h"
31static Shape extractShapeFromTensor(
const Tensor *tensor)
34 if (
tensor->element_type() == DataType::S32)
37 for (
int i = 0;
i <
tensor->shape().num_elements(); ++
i)
42 else if (
tensor->element_type() == DataType::S64)
45 for (
int i = 0;
i <
tensor->shape().num_elements(); ++
i)
100 const auto *input_data =
input()->
data<
void>();
105 std::memcpy(output_data, input_data, num_elements * element_size);
int32_t num_elements() const
void resize(const Shape &new_shape)
const Shape & shape() const
Reshape(const Tensor *input, const Tensor *shape, Tensor *output)
const Tensor * shape() const
void configure() override
void execute() const override
const Tensor * input() const
#define LUCI_INTERPRETER_CHECK(cond)
const luci_interpreter::RuntimeShape output_shape
size_t getDataTypeSize(DataType data_type)
T must_cast(loco::Node *node)