Param param;
param.output_index = ofm_index.asInt();
- for (const auto &e : node.getInputs().list())
+ for (const auto &e : node.getInputs())
{
param.input_indexes.emplace_back(e.asInt());
}
Param param;
param.output_index = ofm_index.asInt();
- for (const auto &e : node.getInputs().list())
+ for (const auto &e : node.getInputs())
{
param.input_indexes.emplace_back(e.asInt());
}
param.ofm_shape = ::neurun::kernel::cpu::getShape(_ctx.at(ofm_index));
- for (auto e : node.getInputs().list())
+ for (auto e : node.getInputs())
{
param.ifm_shapes.emplace_back(::neurun::kernel::cpu::getShape(_ctx.at(e)));
}
{
VERBOSE(LIR) << "* Concat" << std::endl;
std::string inputs;
- for (auto i : node.getInputs().list())
+ for (auto i : node.getInputs())
{
inputs += std::to_string(i.value()) + ",";
}
{
VERBOSE(LIR) << "* NOP" << std::endl;
std::string inputs, outputs;
- for (auto i : node.getInputs().list())
+ for (auto i : node.getInputs())
{
inputs += std::to_string(i.value()) + ",";
}
VERBOSE(LIR) << " - Inputs : IFM(" << inputs << ")" << std::endl;
- for (auto i : node.getOutputs().list())
+ for (auto i : node.getOutputs())
{
outputs += std::to_string(i.value()) + ",";
}
_builder.addShapeConstr(ofm_index, ::internal::asTensorInfo(ofm_shape));
// Set Shape Constraints (for input)
- for (const auto &index : node.getInputs().list())
+ for (const auto &index : node.getInputs())
{
const ::neurun::graph::operand::Index ifm_index{index};
const auto ifm_shape = _ctx.at(ifm_index).shape().asFeature();
auto cur_output_indexes = node->getOutputs();
assert(cur_output_indexes.size() == 1); // Assume output of inserted node size always 1
// TODO : If the API for setting input one by one is introduced, it would be changed to simple.
- for (auto next_input_index : next_input_indexes.list())
+ for (auto next_input_index : next_input_indexes)
{
if (prev_operand_index == next_input_index)
{
{
operations().iterate([&](const operation::Index &index, const operation::Node &node) -> void {
auto outputs = node.getOutputs();
- for (auto output : outputs.list())
+ for (auto output : outputs)
{
operands().at(output).appendDef(index);
}
auto inputs = node.getInputs();
- for (auto input : inputs.list())
+ for (auto input : inputs)
{
operands().at(input).appendUse(index);
}
visited[index.asInt()] = true;
auto outputs = node.getOutputs();
- for (auto output : outputs.list())
+ for (auto output : outputs)
{
// TODO Fix traversing algorithm
// Every time need to search for operations that has `outgoing` as incoming from all
// operations but we can hold that info cached
graph._operations.iterate([&](const operation::Index &cand_index, NodeRef cand_node) -> void {
auto inputs = cand_node.getInputs();
- for (auto input : inputs.list())
+ for (auto input : inputs)
{
if (output == input)
{
public:
uint32_t size() const { return static_cast<uint32_t>(_set.size()); }
- const std::vector<Index> &list() const { return _set; }
const Index &at(IO::Index set_index) const { return _set.at(set_index.asInt()); }
const Index &at(uint32_t index) const { return _set.at(index); }
bool contains(const Index &index) const;
+public:
+ std::vector<Index>::const_iterator begin(void) const { return _set.begin(); }
+ std::vector<Index>::const_iterator end(void) const { return _set.end(); }
+
private:
std::vector<Index> _set;
};
on_stack[index.value()] = true;
auto outputs = node.getOutputs();
- for (auto output : outputs.list())
+ for (auto output : outputs)
{
// TODO Fix traversing algorithm
// Every time need to search for operations that has `outgoing` as incoming from all
// operations but we can hold that info cached
operations.iterate([&](const operation::Index &cand_index, const operation::Node &cand_node) {
auto inputs = cand_node.getInputs();
- for (auto input : inputs.list())
+ for (auto input : inputs)
{
if (output == input)
{
for (const auto op : _operations)
{
auto tensor_builder = resolver.getTensorBuilder(typeid(*op));
- for (const auto &ind : op->getInputs().list())
+ for (const auto &ind : op->getInputs())
{
tensor_builder->mark(ind);
}
- for (const auto &ind : op->getOutputs().list())
+ for (const auto &ind : op->getOutputs())
{
tensor_builder->mark(ind);
}