未验证 提交 cb620ca6 编写于 作者: Z Zeng Jinle 提交者: GitHub

Add const for OpDesc::id() and VarDesc::id() (#36298)

* add const OpDesc id()

* add const for VarDesc::id()
上级 21dc7f40
......@@ -164,7 +164,7 @@ class OpDesc {
// Note: the identity only used as a key for referring to its
// distributed attribute now.
uint64_t Id() { return id_; }
uint64_t Id() const { return id_; }
private:
template <typename MapType>
......
......@@ -160,7 +160,7 @@ class VarDesc {
// Note: the identity only used as a key for referring to its
// distributed attribute now.
uint64_t Id() { return id_; }
uint64_t Id() const { return id_; }
private:
const proto::VarType::TensorDesc &tensor_desc() const;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册