This commit revises `unordered_set`s to use `graph::Index` as key
which used `int` as key because hash function was not exist.
Signed-off-by: Hanjoung Lee <hanjoung.lee@samsung.com>
{
assert(_tensors.size() == 0);
- _inds.insert(ind.asInt());
+ _inds.insert(ind);
}
void TensorBuilder::prepare(codegen::Plan &plan,
std::shared_ptr<::arm_compute::CLTensor> at(const ::neurun::graph::operand::Index &ind);
private:
- std::unordered_set<int> _inds;
+ std::unordered_set<graph::operand::Index> _inds;
std::unordered_map<int, std::shared_ptr<::arm_compute::CLTensor>> _tensors;
};
{
assert(_tensors.size() == 0);
- _inds.insert(ind.asInt());
+ _inds.insert(ind);
}
void TensorBuilder::prepare(codegen::Plan &plan,
#include "backend/ITensorBuilder.h"
#include "backend/cpu/operand/Tensor.h"
+#include "graph/operand/Index.h"
namespace neurun
{
std::shared_ptr<operand::Tensor> at(const ::neurun::graph::operand::Index &ind);
private:
- std::unordered_set<int> _inds;
+ std::unordered_set<graph::operand::Index> _inds;
std::unordered_map<int, std::shared_ptr<operand::Tensor>> _tensors;
};