auto tensor = std::make_shared<::arm_compute::CLTensor>();
tensor->allocator()->init(tensor_info_ctx.at(ind.asInt()));
plan.operands().set(ind, std::make_shared<operand::Object>(tensor));
- _tensors[ind.asInt()] = tensor;
+ _tensors[ind] = tensor;
}
}
std::shared_ptr<::arm_compute::CLTensor>
TensorBuilder::at(const ::neurun::graph::operand::Index &ind)
{
- return _tensors.at(ind.asInt());
+ return _tensors.at(ind);
}
} // namespace acl_cl
private:
std::unordered_set<graph::operand::Index> _inds;
- std::unordered_map<int, std::shared_ptr<::arm_compute::CLTensor>> _tensors;
+ std::unordered_map<graph::operand::Index, std::shared_ptr<::arm_compute::CLTensor>> _tensors;
};
} // namespace acl_cl
// TODO Fix allocation here. When Tensor object is created the memory for tensor is also
// allocated, and this must be fixed.
plan.operands().set(ind, std::make_shared<operand::Object>(tensor));
- _tensors[ind.asInt()] = tensor;
+ _tensors[ind] = tensor;
}
}
std::shared_ptr<operand::Tensor> TensorBuilder::at(const ::neurun::graph::operand::Index &ind)
{
- return _tensors.at(ind.asInt());
+ return _tensors.at(ind);
}
} // namespace cpu
private:
std::unordered_set<graph::operand::Index> _inds;
- std::unordered_map<int, std::shared_ptr<operand::Tensor>> _tensors;
+ std::unordered_map<graph::operand::Index, std::shared_ptr<operand::Tensor>> _tensors;
};
} // namespace cpu