serialize.cc 580 Bytes
Newer Older
1
2
3
4
5
6
7
/**
 *  Copyright (c) 2023 by Contributors
 * @file graphbolt/src/serialize.cc
 * @brief Source file of serialize.
 */

#include <graphbolt/serialize.h>
8
#include <torch/torch.h>
9
10
11
12
13

namespace torch {

serialize::InputArchive& operator>>(
    serialize::InputArchive& archive,
14
    graphbolt::sampling::FusedCSCSamplingGraph& graph) {
15
16
17
18
19
20
  graph.Load(archive);
  return archive;
}

serialize::OutputArchive& operator<<(
    serialize::OutputArchive& archive,
21
    const graphbolt::sampling::FusedCSCSamplingGraph& graph) {
22
23
24
25
26
  graph.Save(archive);
  return archive;
}

}  // namespace torch