Unverified Commit 4b73c375 authored by Hongzhi (Steve), Chen's avatar Hongzhi (Steve), Chen Committed by GitHub
Browse files

[misc] fix the comment format. (#5705)


Co-authored-by: default avatarUbuntu <ubuntu@ip-172-31-28-63.ap-northeast-1.compute.internal>
parent c92d012b
...@@ -71,21 +71,21 @@ struct HeteroInfo { ...@@ -71,21 +71,21 @@ struct HeteroInfo {
torch::Tensor type_per_edge; torch::Tensor type_per_edge;
/** /**
** @brief Magic number to indicate Hetero info version in serialize/ * @brief Magic number to indicate Hetero info version in serialize/
** deserialize stages. * deserialize stages.
**/ */
static constexpr int64_t kHeteroInfoSerializeMagic = 0xDD2E60F0F6B4A129; static constexpr int64_t kHeteroInfoSerializeMagic = 0xDD2E60F0F6B4A129;
/** /**
** @brief Load hetero info from stream. * @brief Load hetero info from stream.
** @param archive Input stream for deserializing. * @param archive Input stream for deserializing.
**/ */
void Load(torch::serialize::InputArchive& archive); void Load(torch::serialize::InputArchive& archive);
/** /**
** @brief Save hetero info to stream. * @brief Save hetero info to stream.
** @param archive Output stream for serializing. * @param archive Output stream for serializing.
**/ */
void Save(torch::serialize::OutputArchive& archive) const; void Save(torch::serialize::OutputArchive& archive) const;
}; };
...@@ -170,21 +170,21 @@ class CSCSamplingGraph : public torch::CustomClassHolder { ...@@ -170,21 +170,21 @@ class CSCSamplingGraph : public torch::CustomClassHolder {
} }
/** /**
** @brief Magic number to indicate graph version in serialize/deserialize * @brief Magic number to indicate graph version in serialize/deserialize
** stage. * stage.
**/ */
static constexpr int64_t kCSCSamplingGraphSerializeMagic = 0xDD2E60F0F6B4A128; static constexpr int64_t kCSCSamplingGraphSerializeMagic = 0xDD2E60F0F6B4A128;
/** /**
** @brief Load graph from stream. * @brief Load graph from stream.
** @param archive Input stream for deserializing. * @param archive Input stream for deserializing.
**/ */
void Load(torch::serialize::InputArchive& archive); void Load(torch::serialize::InputArchive& archive);
/** /**
** @brief Save graph to stream. * @brief Save graph to stream.
** @param archive Output stream for serializing. * @param archive Output stream for serializing.
**/ */
void Save(torch::serialize::OutputArchive& archive) const; void Save(torch::serialize::OutputArchive& archive) const;
private: private:
...@@ -202,18 +202,18 @@ class CSCSamplingGraph : public torch::CustomClassHolder { ...@@ -202,18 +202,18 @@ class CSCSamplingGraph : public torch::CustomClassHolder {
} // namespace graphbolt } // namespace graphbolt
/** /**
** @brief Overload stream operator to enable `torch::save()` and `torch.load()` * @brief Overload stream operator to enable `torch::save()` and `torch.load()`
** for CSCSamplingGraph. * for CSCSamplingGraph.
**/ */
namespace torch { namespace torch {
/** /**
** @brief Overload input stream operator for CSCSamplingGraph deserialization. * @brief Overload input stream operator for CSCSamplingGraph deserialization.
** @param archive Input stream for deserializing. * @param archive Input stream for deserializing.
** @param graph CSCSamplingGraph. * @param graph CSCSamplingGraph.
** *
** @return archive * @return archive
**/ */
inline serialize::InputArchive& operator>>( inline serialize::InputArchive& operator>>(
serialize::InputArchive& archive, serialize::InputArchive& archive,
graphbolt::sampling::CSCSamplingGraph& graph); graphbolt::sampling::CSCSamplingGraph& graph);
......
...@@ -20,7 +20,7 @@ namespace utils { ...@@ -20,7 +20,7 @@ namespace utils {
* @param archive Output archive. * @param archive Output archive.
* @param key Key name used in saving. * @param key Key name used in saving.
* @param data Data that could be constructed as `torch::IValue`. * @param data Data that could be constructed as `torch::IValue`.
**/ */
template <typename DataT> template <typename DataT>
void write_to_archive( void write_to_archive(
torch::serialize::OutputArchive& archive, const std::string& key, torch::serialize::OutputArchive& archive, const std::string& key,
...@@ -33,7 +33,7 @@ void write_to_archive( ...@@ -33,7 +33,7 @@ void write_to_archive(
* @param archive Output archive. * @param archive Output archive.
* @param key Key name used in saving. * @param key Key name used in saving.
* @param data Vector of string. * @param data Vector of string.
**/ */
template <> template <>
void write_to_archive<std::vector<std::string>>( void write_to_archive<std::vector<std::string>>(
torch::serialize::OutputArchive& archive, const std::string& key, torch::serialize::OutputArchive& archive, const std::string& key,
...@@ -50,7 +50,7 @@ void write_to_archive<std::vector<std::string>>( ...@@ -50,7 +50,7 @@ void write_to_archive<std::vector<std::string>>(
* @param archive Input archive. * @param archive Input archive.
* @param key Key name used in reading. * @param key Key name used in reading.
* @param data Data that could be constructed as `torch::IValue`. * @param data Data that could be constructed as `torch::IValue`.
**/ */
template <typename DataT = torch::IValue> template <typename DataT = torch::IValue>
void read_from_archive( void read_from_archive(
torch::serialize::InputArchive& archive, const std::string& key, torch::serialize::InputArchive& archive, const std::string& key,
...@@ -63,7 +63,7 @@ void read_from_archive( ...@@ -63,7 +63,7 @@ void read_from_archive(
* @param archive Input archive. * @param archive Input archive.
* @param key Key name used in reading. * @param key Key name used in reading.
* @param data Data that is `bool`. * @param data Data that is `bool`.
**/ */
template <> template <>
void read_from_archive<bool>( void read_from_archive<bool>(
torch::serialize::InputArchive& archive, const std::string& key, torch::serialize::InputArchive& archive, const std::string& key,
...@@ -78,7 +78,7 @@ void read_from_archive<bool>( ...@@ -78,7 +78,7 @@ void read_from_archive<bool>(
* @param archive Input archive. * @param archive Input archive.
* @param key Key name used in reading. * @param key Key name used in reading.
* @param data Data that is `int64_t`. * @param data Data that is `int64_t`.
**/ */
template <> template <>
void read_from_archive<int64_t>( void read_from_archive<int64_t>(
torch::serialize::InputArchive& archive, const std::string& key, torch::serialize::InputArchive& archive, const std::string& key,
...@@ -93,7 +93,7 @@ void read_from_archive<int64_t>( ...@@ -93,7 +93,7 @@ void read_from_archive<int64_t>(
* @param archive Input archive. * @param archive Input archive.
* @param key Key name used in reading. * @param key Key name used in reading.
* @param data Data that is `std::string`. * @param data Data that is `std::string`.
**/ */
template <> template <>
void read_from_archive<std::string>( void read_from_archive<std::string>(
torch::serialize::InputArchive& archive, const std::string& key, torch::serialize::InputArchive& archive, const std::string& key,
...@@ -108,7 +108,7 @@ void read_from_archive<std::string>( ...@@ -108,7 +108,7 @@ void read_from_archive<std::string>(
* @param archive Input archive. * @param archive Input archive.
* @param key Key name used in reading. * @param key Key name used in reading.
* @param data Data that is `torch::Tensor`. * @param data Data that is `torch::Tensor`.
**/ */
template <> template <>
void read_from_archive<torch::Tensor>( void read_from_archive<torch::Tensor>(
torch::serialize::InputArchive& archive, const std::string& key, torch::serialize::InputArchive& archive, const std::string& key,
...@@ -123,7 +123,7 @@ void read_from_archive<torch::Tensor>( ...@@ -123,7 +123,7 @@ void read_from_archive<torch::Tensor>(
* @param archive Output archive. * @param archive Output archive.
* @param key Key name used in saving. * @param key Key name used in saving.
* @param data Vector of string. * @param data Vector of string.
**/ */
template <> template <>
void read_from_archive<std::vector<std::string>>( void read_from_archive<std::vector<std::string>>(
torch::serialize::InputArchive& archive, const std::string& key, torch::serialize::InputArchive& archive, const std::string& key,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment