forked from dmlc/dgl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Data format] Serialization for Immutable Graph and HeteroGraph (dmlc…
…#1254) * graph format * fix lint * lint * fix * unit test * lint * add magic num * move serialize out of struct * lint * serialize * trigger CI * fix lint * lint Co-authored-by: zhoujinjing09 <[email protected]>
- Loading branch information
1 parent
ffe5898
commit 23893bb
Showing
8 changed files
with
194 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/*! | ||
* Copyright (c) 2018 by Contributors | ||
* \file graph/graph_serializer.cc | ||
* \brief DGL serializer APIs | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <dgl/immutable_graph.h> | ||
#include "heterograph.h" | ||
#include "unit_graph.h" | ||
|
||
namespace dgl { | ||
|
||
class Serializer { | ||
public: | ||
static HeteroGraph* EmptyHeteroGraph() { return new HeteroGraph(); } | ||
static ImmutableGraph* EmptyImmutableGraph() { | ||
return new ImmutableGraph(static_cast<COOPtr>(nullptr)); | ||
} | ||
static UnitGraph* EmptyUnitGraph() { | ||
return UnitGraph::EmptyGraph(); | ||
} | ||
}; | ||
} // namespace dgl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters