{
public:
ANeuralNetworksCompilation(const std::shared_ptr<const internal::tflite::Model> &model)
- : _model{model}, _output{new internal::arm_compute::Model}
+ : _plan{new internal::arm_compute::Plan{model}}
{
// DO NOTHING
}
public:
- const internal::tflite::Model &model(void) const { return *_model; }
- internal::arm_compute::Model &output(void) { return *_output; }
+ internal::arm_compute::Plan &plan(void) { return *_plan; }
public:
- void publish(std::shared_ptr<const internal::arm_compute::Model> &output)
+ void publish(std::shared_ptr<const internal::arm_compute::Plan> &plan)
{
- output = _output;
+ plan = _plan;
}
private:
- std::shared_ptr<const internal::tflite::Model> _model;
- std::shared_ptr<internal::arm_compute::Model> _output;
+ std::shared_ptr<internal::arm_compute::Plan> _plan;
};
#endif
ResultCode
ANeuralNetworksExecution_create(ANeuralNetworksCompilation* compilation, ANeuralNetworksExecution** execution)
{
- std::shared_ptr<const ::internal::arm_compute::Model> model;
+ std::shared_ptr<const ::internal::arm_compute::Plan> plan;
- compilation->publish(model);
+ compilation->publish(plan);
- *execution = new ANeuralNetworksExecution{model};
+ *execution = new ANeuralNetworksExecution{plan};
return ANEURALNETWORKS_NO_ERROR;
}
{
assert(execution != nullptr);
- const auto &operations = execution->model().operations();
+ const auto &operations = execution->plan().operations();
for (uint32_t n = 0; n < operations.size(); ++n)
{
struct ANeuralNetworksExecution
{
public:
- ANeuralNetworksExecution(const std::shared_ptr<const internal::arm_compute::Model> &model)
- : _model{model}
+ ANeuralNetworksExecution(const std::shared_ptr<const internal::arm_compute::Plan> &plan)
+ : _plan{plan}
{
// DO NOTHING
}
public:
- const internal::arm_compute::Model &model(void) const { return *_model; }
+ const internal::arm_compute::Plan &plan(void) const { return *_plan; }
private:
- std::shared_ptr<const internal::arm_compute::Model> _model;
+ std::shared_ptr<const internal::arm_compute::Plan> _plan;
};
#endif
namespace arm_compute
{
-class Model
+class Plan
{
public:
+ Plan(const std::shared_ptr<const ::internal::tflite::Model> &model) : _model(model)
+ {
+ // DO NOTHING
+ }
+
+public:
+ const ::internal::tflite::Model &model(void) const { return *_model; }
+
+public:
operand::Context &operands(void) { return _operands; }
const operand::Context &operands(void) const { return _operands; }
const op::Sequence &operations(void) const { return _ops; }
private:
+ std::shared_ptr<const ::internal::tflite::Model> _model;
operand::Context _operands;
op::Sequence _ops;