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

[Misc] Replace \xxx with @XXX in structured comment. (#4822)



* param

* brief

* note

* return

* tparam

* brief2

* file

* return2

* return

* blabla

* all
Co-authored-by: default avatarSteve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
parent 96297fb8
/*!
* Copyright (c) 2018 by Contributors
* \file graph/graph.cc
* \brief DGL graph index implementation
* @file graph/graph.cc
* @brief DGL graph index implementation
*/
#include <dgl/graph.h>
#include <dgl/sampler.h>
......
/*!
* Copyright (c) 2018 by Contributors
* \file graph/graph.cc
* \brief DGL graph index APIs
* @file graph/graph.cc
* @brief DGL graph index APIs
*/
#include <dgl/graph.h>
#include <dgl/graph_op.h>
......
/*!
* Copyright (c) 2018 by Contributors
* \file graph/graph.cc
* \brief Graph operation implementation
* @file graph/graph.cc
* @brief Graph operation implementation
*/
#include <dgl/array.h>
#include <dgl/graph_op.h>
......
/*!
* Copyright (c) 2018 by Contributors
* \file graph/traversal.cc
* \brief Graph traversal implementation
* @file graph/traversal.cc
* @brief Graph traversal implementation
*/
#include <dgl/graph_traversal.h>
#include <dgl/packed_func_ext.h>
......
/*!
* Copyright (c) 2019 by Contributors
* \file graph/heterograph.cc
* \brief Heterograph implementation
* @file graph/heterograph.cc
* @brief Heterograph implementation
*/
#include "./heterograph.h"
......
/*!
* Copyright (c) 2019 by Contributors
* \file graph/heterograph.h
* \brief Heterograph
* @file graph/heterograph.h
* @brief Heterograph
*/
#ifndef DGL_GRAPH_HETEROGRAPH_H_
......@@ -21,7 +21,7 @@
namespace dgl {
/*! \brief Heterograph */
/*! @brief Heterograph */
class HeteroGraph : public BaseHeteroGraph {
public:
HeteroGraph(
......@@ -219,22 +219,22 @@ class HeteroGraph : public BaseHeteroGraph {
GraphPtr AsImmutableGraph() const override;
/*! \return Load HeteroGraph from stream, using CSRMatrix*/
/*! @return Load HeteroGraph from stream, using CSRMatrix*/
bool Load(dmlc::Stream* fs);
/*! \return Save HeteroGraph to stream, using CSRMatrix */
/*! @return Save HeteroGraph to stream, using CSRMatrix */
void Save(dmlc::Stream* fs) const;
/*! \brief Convert the graph to use the given number of bits for storage */
/*! @brief Convert the graph to use the given number of bits for storage */
static HeteroGraphPtr AsNumBits(HeteroGraphPtr g, uint8_t bits);
/*! \brief Copy the data to another context */
/*! @brief Copy the data to another context */
static HeteroGraphPtr CopyTo(HeteroGraphPtr g, const DGLContext &ctx);
/*!
* \brief Pin all relation graphs of the current graph.
* \note The graph will be pinned inplace. Behavior depends on the current context,
* @brief Pin all relation graphs of the current graph.
* @note The graph will be pinned inplace. Behavior depends on the current context,
* kDGLCPU: will be pinned;
* IsPinned: directly return;
* kDGLCUDA: invalid, will throw an error.
......@@ -243,8 +243,8 @@ class HeteroGraph : public BaseHeteroGraph {
void PinMemory_() override;
/*!
* \brief Unpin all relation graphs of the current graph.
* \note The graph will be unpinned inplace. Behavior depends on the current context,
* @brief Unpin all relation graphs of the current graph.
* @note The graph will be unpinned inplace. Behavior depends on the current context,
* IsPinned: will be unpinned;
* others: directly return.
* The context check is deferred to unpinning the NDArray.
......@@ -252,12 +252,12 @@ class HeteroGraph : public BaseHeteroGraph {
void UnpinMemory_();
/*!
* \brief Record stream for this graph.
* \param stream The stream that is using the graph
* @brief Record stream for this graph.
* @param stream The stream that is using the graph
*/
void RecordStream(DGLStreamHandle stream) override;
/*! \brief Copy the data to shared memory.
/*! @brief Copy the data to shared memory.
*
* Also save names of node types and edge types of the HeteroGraph object to shared memory
*/
......@@ -265,13 +265,13 @@ class HeteroGraph : public BaseHeteroGraph {
HeteroGraphPtr g, const std::string& name, const std::vector<std::string>& ntypes,
const std::vector<std::string>& etypes, const std::set<std::string>& fmts);
/*! \brief Create a heterograph from
/*! @brief Create a heterograph from
* \return the HeteroGraphPtr, names of node types, names of edge types
*/
static std::tuple<HeteroGraphPtr, std::vector<std::string>, std::vector<std::string>>
CreateFromSharedMem(const std::string &name);
/*! \brief Creat a LineGraph of self */
/*! @brief Creat a LineGraph of self */
HeteroGraphPtr LineGraph(bool backtracking) const;
const std::vector<UnitGraphPtr>& relation_graphs() const {
......@@ -285,23 +285,23 @@ class HeteroGraph : public BaseHeteroGraph {
// Empty Constructor, only for serializer
HeteroGraph() : BaseHeteroGraph() {}
/*! \brief A map from edge type to unit graph */
/*! @brief A map from edge type to unit graph */
std::vector<UnitGraphPtr> relation_graphs_;
/*! \brief A map from vert type to the number of verts in the type */
/*! @brief A map from vert type to the number of verts in the type */
std::vector<int64_t> num_verts_per_type_;
/*! \brief The shared memory object for meta info*/
/*! @brief The shared memory object for meta info*/
std::shared_ptr<runtime::SharedMemory> shared_mem_;
/*! \brief The name of the shared memory. Return empty string if it is not in shared memory. */
/*! @brief The name of the shared memory. Return empty string if it is not in shared memory. */
std::string SharedMemName() const;
/*! \brief template class for Flatten operation
/*! @brief template class for Flatten operation
*
* \tparam IdType Graph's index data type, can be int32_t or int64_t
* \param etypes vector of etypes to be falttened
* \return pointer of FlattenedHeteroGraphh
* @tparam IdType Graph's index data type, can be int32_t or int64_t
* @param etypes vector of etypes to be falttened
* @return pointer of FlattenedHeteroGraphh
*/
template <class IdType>
FlattenedHeteroGraphPtr FlattenImpl(const std::vector<dgl_type_t>& etypes) const;
......
/*!
* Copyright (c) 2020 by Contributors
* \file graph/heterograph_capi.cc
* \brief Heterograph CAPI bindings.
* @file graph/heterograph_capi.cc
* @brief Heterograph CAPI bindings.
*/
#include <dgl/array.h>
#include <dgl/aten/coo.h>
......
/*!
* Copyright (c) 2018 by Contributors
* \file graph/immutable_graph.cc
* \brief DGL immutable graph index implementation
* @file graph/immutable_graph.cc
* @brief DGL immutable graph index implementation
*/
#include <dgl/base_heterograph.h>
......@@ -626,7 +626,7 @@ ImmutableGraphPtr ImmutableGraph::Reverse() const {
constexpr uint64_t kDGLSerialize_ImGraph = 0xDD3c5FFE20046ABF;
/*! \return Load HeteroGraph from stream, using OutCSR Matrix*/
/*! @return Load HeteroGraph from stream, using OutCSR Matrix*/
bool ImmutableGraph::Load(dmlc::Stream *fs) {
uint64_t magicNum;
aten::CSRMatrix out_csr_matrix;
......@@ -637,7 +637,7 @@ bool ImmutableGraph::Load(dmlc::Stream *fs) {
return true;
}
/*! \return Save HeteroGraph to stream, using OutCSR Matrix */
/*! @return Save HeteroGraph to stream, using OutCSR Matrix */
void ImmutableGraph::Save(dmlc::Stream *fs) const {
fs->Write(kDGLSerialize_ImGraph);
fs->Write(GetOutCSR());
......
/*!
* Copyright (c) 2020 by Contributors
* \file graph/metis_partition.cc
* \brief Call Metis partitioning
* @file graph/metis_partition.cc
* @brief Call Metis partitioning
*/
#include <dgl/graph_op.h>
......
/*!
* Copyright (c) 2018-2022 by Contributors
* \file graph/network.cc
* \brief DGL networking related APIs
* @file graph/network.cc
* @brief DGL networking related APIs
*/
#include "./network.h"
......
/*!
* Copyright (c) 2018 by Contributors
* \file graph/network.h
* \brief DGL networking related APIs
* @file graph/network.h
* @brief DGL networking related APIs
*/
#ifndef DGL_GRAPH_NETWORK_H_
#define DGL_GRAPH_NETWORK_H_
......@@ -22,72 +22,72 @@ namespace dgl {
namespace network {
/*!
* \brief Create NDArray from raw data
* @brief Create NDArray from raw data
*/
NDArray CreateNDArrayFromRaw(
std::vector<int64_t> shape, DGLDataType dtype, DGLContext ctx, void* raw);
/*!
* \brief Message type for DGL distributed training
* @brief Message type for DGL distributed training
*/
enum MessageType {
/*!
* \brief Message for send/recv NodeFlow
* @brief Message for send/recv NodeFlow
*/
kNodeFlowMsg = 0,
/*!
* \brief Message for end-signal
* @brief Message for end-signal
*/
kFinalMsg = 1,
/*!
* \brief Initialize KVStore
* @brief Initialize KVStore
*/
kInitMsg = 2,
/*!
* \brief Push msg to KVStore
* @brief Push msg to KVStore
*/
kPushMsg = 3,
/*!
* \brief Pull msg from KVStore
* @brief Pull msg from KVStore
*/
kPullMsg = 4,
/*!
* \brief PullBack msg from KVStore
* @brief PullBack msg from KVStore
*/
kPullBackMsg = 5,
/*!
* \brief Barrier msg for KVStore
* @brief Barrier msg for KVStore
*/
kBarrierMsg = 6,
/*!
* \brief IP and ID msg for KVStore
* @brief IP and ID msg for KVStore
*/
kIPIDMsg = 7,
/*!
* \brief Get data shape msg for KVStore
* @brief Get data shape msg for KVStore
*/
kGetShapeMsg = 8,
/*!
* \brief Get data shape back msg for KVStore
* @brief Get data shape back msg for KVStore
*/
kGetShapeBackMsg = 9
};
/*!
* \brief Meta data for NDArray message
* @brief Meta data for NDArray message
*/
class ArrayMeta {
public:
/*!
* \brief ArrayMeta constructor.
* \param msg_type type of message
* @brief ArrayMeta constructor.
* @param msg_type type of message
*/
explicit ArrayMeta(int msg_type) : msg_type_(msg_type), ndarray_count_(0) {}
/*!
* \brief Construct ArrayMeta from binary data buffer.
* \param buffer data buffer
* \param size data size
* @brief Construct ArrayMeta from binary data buffer.
* @param buffer data buffer
* @param size data size
*/
ArrayMeta(char* buffer, int64_t size) {
CHECK_NOTNULL(buffer);
......@@ -95,113 +95,113 @@ class ArrayMeta {
}
/*!
* \return message type
* @return message type
*/
inline int msg_type() const { return msg_type_; }
/*!
* \return count of ndarray
* @return count of ndarray
*/
inline int ndarray_count() const { return ndarray_count_; }
/*!
* \brief Add NDArray meta data to ArrayMeta
* \param array DGL NDArray
* @brief Add NDArray meta data to ArrayMeta
* @param array DGL NDArray
*/
void AddArray(const NDArray& array);
/*!
* \brief Serialize ArrayMeta to data buffer
* \param size size of serialized message
* \return pointer of data buffer
* @brief Serialize ArrayMeta to data buffer
* @param size size of serialized message
* @return pointer of data buffer
*/
char* Serialize(int64_t* size);
/*!
* \brief Deserialize ArrayMeta from data buffer
* \param buffer data buffer
* \param size size of data buffer
* @brief Deserialize ArrayMeta from data buffer
* @param buffer data buffer
* @param size size of data buffer
*/
void Deserialize(char* buffer, int64_t size);
/*!
* \brief type of message
* @brief type of message
*/
int msg_type_;
/*!
* \brief count of ndarray in MetaMsg
* @brief count of ndarray in MetaMsg
*/
int ndarray_count_;
/*!
* \brief DataType for each NDArray
* @brief DataType for each NDArray
*/
std::vector<DGLDataType> data_type_;
/*!
* \brief We first write the ndim to data_shape_
* @brief We first write the ndim to data_shape_
* and then write the data shape.
*/
std::vector<int64_t> data_shape_;
};
/*!
* \brief C structure for holding DGL KVServer message
* @brief C structure for holding DGL KVServer message
*/
class KVStoreMsg {
public:
/*!
* \brief KVStoreMsg constructor.
* @brief KVStoreMsg constructor.
*/
KVStoreMsg() {}
/*!
* \brief Construct KVStoreMsg from binary data buffer.
* \param buffer data buffer
* \param size data size
* @brief Construct KVStoreMsg from binary data buffer.
* @param buffer data buffer
* @param size data size
*/
KVStoreMsg(char* buffer, int64_t size) {
CHECK_NOTNULL(buffer);
this->Deserialize(buffer, size);
}
/*!
* \brief Serialize KVStoreMsg to data buffer
* @brief Serialize KVStoreMsg to data buffer
* Note that we don't serialize ID and data here.
* \param size size of serialized message
* \return pointer of data buffer
* @param size size of serialized message
* @return pointer of data buffer
*/
char* Serialize(int64_t* size);
/*!
* \brief Deserialize KVStoreMsg from data buffer
* \param buffer data buffer
* \param size size of data buffer
* @brief Deserialize KVStoreMsg from data buffer
* @param buffer data buffer
* @param size size of data buffer
*/
void Deserialize(char* buffer, int64_t size);
/*!
* \brief Message type of kvstore
* @brief Message type of kvstore
*/
int msg_type;
/*!
* \brief Sender's ID
* @brief Sender's ID
*/
int rank;
/*!
* \brief data name
* @brief data name
*/
std::string name;
/*!
* \brief data ID
* @brief data ID
*/
NDArray id;
/*!
* \brief data matrix
* @brief data matrix
*/
NDArray data;
/*!
* \brief data shape
* @brief data shape
*/
NDArray shape;
};
......
/*!
* Copyright (c) 2019 by Contributors
* \file graph/nodeflow.cc
* \brief DGL NodeFlow related functions.
* @file graph/nodeflow.cc
* @brief DGL NodeFlow related functions.
*/
#include <dgl/immutable_graph.h>
......
/*!
* Copyright (c) 2020 by Contributors
* \file graph/pickle.cc
* \brief Functions for pickle and unpickle a graph
* @file graph/pickle.cc
* @brief Functions for pickle and unpickle a graph
*/
#include <dgl/graph_serializer.h>
#include <dgl/immutable_graph.h>
......
/*!
* Copyright (c) 2018 by Contributors
* \file graph/sampler.cc
* \brief DGL sampler implementation
* @file graph/sampler.cc
* @brief DGL sampler implementation
*/
#include <dgl/array.h>
#include <dgl/immutable_graph.h>
......@@ -284,7 +284,7 @@ void GetUniformSample(
/*
* Non-uniform sample via ArrayHeap
*
* \param probability Transition probability on the entire graph, indexed by
* @param probability Transition probability on the entire graph, indexed by
* edge ID
*/
template <typename ValueType>
......
/*!
* Copyright (c) 2021 by Contributors
* \file graph/sampling/negative/global_uniform.cc
* \brief Global uniform negative sampling.
* @file graph/sampling/negative/global_uniform.cc
* @brief Global uniform negative sampling.
*/
#include <dgl/array.h>
......
/*!
* Copyright (c) 2020-2021 by Contributors
* \file graph/sampling/neighbor.cc
* \brief Definition of neighborhood-based sampler APIs.
* @file graph/sampling/neighbor.cc
* @brief Definition of neighborhood-based sampler APIs.
*/
#include <dgl/runtime/container.h>
......
/*!
* Copyright (c) 2021 by Contributors
* \file graph/sampling/frequency_hashmap.cu
* \brief frequency hashmap - used to select top-k frequency edges of each node
* @file graph/sampling/frequency_hashmap.cu
* @brief frequency hashmap - used to select top-k frequency edges of each node
*/
#include <algorithm>
......
/*!
* Copyright (c) 2021 by Contributors
* \file graph/sampling/frequency_hashmap.cuh
* \brief frequency hashmap - used to select top-k frequency edges of each node
* @file graph/sampling/frequency_hashmap.cuh
* @brief frequency hashmap - used to select top-k frequency edges of each node
*/
#ifndef DGL_GRAPH_SAMPLING_RANDOMWALKS_FREQUENCY_HASHMAP_CUH_
......
/*!
* Copyright (c) 2018 by Contributors
* \file graph/sampling/get_node_types_cpu.cc
* \brief DGL sampler - CPU implementation of random walks with OpenMP
* @file graph/sampling/get_node_types_cpu.cc
* @brief DGL sampler - CPU implementation of random walks with OpenMP
*/
#include <dgl/array.h>
......
/*!
* Copyright (c) 2021 by Contributors
* \file graph/sampling/get_node_types_gpu.cu
* \brief DGL sampler
* @file graph/sampling/get_node_types_gpu.cu
* @brief DGL sampler
*/
#include <cuda_runtime.h>
......
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