Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions src/GraphCtrl/GraphPipeline/_GStroage/GStorage.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class GPipeline;
class GStorage : public GraphObject {
protected:
explicit GStorage() = default;
~GStorage() override = default;

/**
* 保存
Expand Down Expand Up @@ -65,12 +66,53 @@ class GStorage : public GraphObject {
* @return
*/
static CStatus loadBuffer(GPipeline* pipeline, char* buffer, CSize size);

/**
* 加载 element 信息
* @param pipeline
* @param storage
* @return
*/
static CStatus loadElement(GPipeline* pipeline, const _GPipelineStorage& storage);

/**
* 加载 event 信息
* @param pipeline
* @param storage
* @return
*/
static CStatus loadEvent(GPipeline* pipeline, const _GPipelineStorage& storage);

/**
* 加载 GParam 信息
* @param pipeline
* @param storage
* @return
*/
static CStatus loadParam(GPipeline* pipeline, const _GPipelineStorage& storage);

/**
*
* @param pipeline
* @param storage
* @return
*/
static CStatus loadDaemon(GPipeline* pipeline, const _GPipelineStorage& storage);

/**
* 加载 stage 信息
* @param pipeline
* @param storage
* @return
*/
static CStatus loadStage(GPipeline* pipeline, const _GPipelineStorage& storage);

/**
* 加载 aspect 信息
* @param element
* @param aspStorages
* @return
*/
static CStatus loadAspect(GElementPtr element, const std::vector<_GAspectStorage>& aspStorages);

friend class GPipeline;
Expand Down
3 changes: 2 additions & 1 deletion src/GraphCtrl/GraphPipeline/_GStroage/GStorageFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ class GStorageFactory : public GraphObject {
friend class GStorage;
};

#define CGRAPH_REGISTER_META_TYPE(_CLZ) GStorageFactory::registerMetaType<_CLZ>(); \
#define CGRAPH_REGISTER_META_TYPE(...) \
do { GStorageFactory::registerMetaType<__VA_ARGS__>(); } while (0) \

CGRAPH_NAMESPACE_END

Expand Down
2 changes: 1 addition & 1 deletion tutorial/T16-MessageSendRecv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void recv_message() {


void tutorial_message_send_recv() {
CGRAPH_CREATE_MESSAGE_TOPIC(MyMessageParam, "send-recv", 48) // 创建一个topic,也在算子中实现创建流程
CGRAPH_CREATE_MESSAGE_TOPIC(MyMessageParam, "send-recv", 48) // 创建一个topic,也可以在算子中进行创建

std::thread sendThd = std::thread(send_message);
std::thread recvThd = std::thread(recv_message);
Expand Down
Loading