提交 1056c01b 编写于 作者: W willzhang4a58

make actor_msg in c++

上级 15efdc67
......@@ -4,7 +4,7 @@
#include "common/util.h"
#include "kernel/kernel.h"
#include "common/task.pb.h"
#include "actor/actor_message.pb.h"
#include "actor/actor_message.h"
#include "register/register.h"
namespace oneflow {
......
#include "actor/actor_message.h"
namespace oneflow {
ActorMsg::ActorMsg() {
TODO();
}
} // namespace oneflow
#ifndef ONEFLOW_ACTOR_ACTOR_MESSAGE_H_
#define ONEFLOW_ACTOR_ACTOR_MESSAGE_H_
#include "common/util.h"
#include "register/register.h"
namespace oneflow {
class ActorMsg final {
public:
// OF_DISALLOW_COPY_AND_MOVE(ActorMsg);
ActorMsg();
~ActorMsg() = default;
// Getters
uint64_t dst_actor_id() const { return dst_actor_id_; }
Regst* regst() const { return regst_; }
// Setters
void set_dst_actor_id(uint64_t val) { dst_actor_id_ = val; }
void set_regst(Regst* val) { regst_ = val; }
private:
uint64_t dst_actor_id_;
Regst* regst_;
};
} // namespace oneflow
#endif // ONEFLOW_ACTOR_ACTOR_MESSAGE_H_
syntax = "proto3";
package oneflow;
message ActorMsg {
uint64 dst_actor_id = 1;
uint64 register_id = 2;
}
......@@ -3,7 +3,7 @@
#include <stdint.h>
#include "common/util.h"
#include "actor/actor_message.pb.h"
#include "actor/actor_message.h"
namespace oneflow {
......
......@@ -2,8 +2,6 @@
#define ONEFLOW_REGISTER_REGISTER_H_
#include "register/blob.h"
#include "actor/actor_message.pb.h"
#include "actor/actor_msg_bus.h"
#include "common/util.h"
#include "register/runtime_register_desc.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册