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

[Misc] Replace /*! with /**. (#4823)



* replace

* blabla

* balbla

* blabla
Co-authored-by: default avatarSteve <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal>
parent 619d735d
/*! /**
* Copyright 2019-2021 Contributors * Copyright 2019-2021 Contributors
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
......
/*! /**
* Copyright 2021 Contributors * Copyright 2021 Contributors
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
......
/*! /**
* Copyright (c) 2021 by Contributors * Copyright (c) 2021 by Contributors
* @file graph/transform/cpu/kdtree_ndarray_adapter.h * @file graph/transform/cpu/kdtree_ndarray_adapter.h
* @brief NDArray adapter for nanoflann, without * @brief NDArray adapter for nanoflann, without
...@@ -18,7 +18,7 @@ namespace dgl { ...@@ -18,7 +18,7 @@ namespace dgl {
namespace transform { namespace transform {
namespace knn_utils { namespace knn_utils {
/*! /**
* @brief A simple 2D NDArray adapter for nanoflann, without duplicating the * @brief A simple 2D NDArray adapter for nanoflann, without duplicating the
* storage. * storage.
* *
...@@ -65,7 +65,7 @@ class KDTreeNDArrayAdapter { ...@@ -65,7 +65,7 @@ class KDTreeNDArrayAdapter {
index_type* GetIndex() { return index_; } index_type* GetIndex() { return index_; }
/*! /**
* @brief Query for the \a num_closest points to a given point * @brief Query for the \a num_closest points to a given point
* Note that this is a short-cut method for GetIndex()->findNeighbors(). * Note that this is a short-cut method for GetIndex()->findNeighbors().
*/ */
...@@ -77,19 +77,19 @@ class KDTreeNDArrayAdapter { ...@@ -77,19 +77,19 @@ class KDTreeNDArrayAdapter {
index_->findNeighbors(resultSet, query_pt, nanoflann::SearchParams()); index_->findNeighbors(resultSet, query_pt, nanoflann::SearchParams());
} }
/*! @brief Interface expected by KDTreeSingleIndexAdaptor */ /** @brief Interface expected by KDTreeSingleIndexAdaptor */
const self_type& derived() const { return *this; } const self_type& derived() const { return *this; }
/*! @brief Interface expected by KDTreeSingleIndexAdaptor */ /** @brief Interface expected by KDTreeSingleIndexAdaptor */
self_type& derived() { return *this; } self_type& derived() { return *this; }
/*! /**
* @brief Interface expected by KDTreeSingleIndexAdaptor, * @brief Interface expected by KDTreeSingleIndexAdaptor,
* return the number of data points * return the number of data points
*/ */
size_t kdtree_get_point_count() const { return data_->shape[0]; } size_t kdtree_get_point_count() const { return data_->shape[0]; }
/*! /**
* @brief Interface expected by KDTreeSingleIndexAdaptor, * @brief Interface expected by KDTreeSingleIndexAdaptor,
* return the dim'th component of the idx'th point * return the dim'th component of the idx'th point
*/ */
...@@ -97,7 +97,7 @@ class KDTreeNDArrayAdapter { ...@@ -97,7 +97,7 @@ class KDTreeNDArrayAdapter {
return data_.Ptr<FloatType>()[idx * data_->shape[1] + dim]; return data_.Ptr<FloatType>()[idx * data_->shape[1] + dim];
} }
/*! /**
* @brief Interface expected by KDTreeSingleIndexAdaptor. * @brief Interface expected by KDTreeSingleIndexAdaptor.
* Optional bounding-box computation: return false to * Optional bounding-box computation: return false to
* default to a standard bbox computation loop. * default to a standard bbox computation loop.
......
/*! /**
* Copyright (c) 2019 by Contributors * Copyright (c) 2019 by Contributors
* @file graph/transform/cpu/knn.cc * @file graph/transform/cpu/knn.cc
* @brief k-nearest-neighbor (KNN) implementation * @brief k-nearest-neighbor (KNN) implementation
...@@ -27,7 +27,7 @@ namespace impl { ...@@ -27,7 +27,7 @@ namespace impl {
// This value is directly from pynndescent // This value is directly from pynndescent
static constexpr int NN_DESCENT_BLOCK_SIZE = 16384; static constexpr int NN_DESCENT_BLOCK_SIZE = 16384;
/*! /**
* @brief Compute Euclidean distance between two vectors, return positive * @brief Compute Euclidean distance between two vectors, return positive
* infinite value if the intermediate distance is greater than the worst * infinite value if the intermediate distance is greater than the worst
* distance. * distance.
...@@ -54,7 +54,7 @@ FloatType EuclideanDistWithCheck( ...@@ -54,7 +54,7 @@ FloatType EuclideanDistWithCheck(
} }
} }
/*! @brief Compute Euclidean distance between two vectors */ /** @brief Compute Euclidean distance between two vectors */
template <typename FloatType, typename IdType> template <typename FloatType, typename IdType>
FloatType EuclideanDist( FloatType EuclideanDist(
const FloatType* vec1, const FloatType* vec2, int64_t dim) { const FloatType* vec1, const FloatType* vec2, int64_t dim) {
...@@ -67,7 +67,7 @@ FloatType EuclideanDist( ...@@ -67,7 +67,7 @@ FloatType EuclideanDist(
return dist; return dist;
} }
/*! @brief Insert a new element into a heap */ /** @brief Insert a new element into a heap */
template <typename FloatType, typename IdType> template <typename FloatType, typename IdType>
void HeapInsert( void HeapInsert(
IdType* out, FloatType* dist, IdType new_id, FloatType new_dist, int k, IdType* out, FloatType* dist, IdType new_id, FloatType new_dist, int k,
...@@ -104,7 +104,7 @@ void HeapInsert( ...@@ -104,7 +104,7 @@ void HeapInsert(
} }
} }
/*! @brief Insert a new element and its flag into heap, return 1 if insert /** @brief Insert a new element and its flag into heap, return 1 if insert
* successfully */ * successfully */
template <typename FloatType, typename IdType> template <typename FloatType, typename IdType>
int FlaggedHeapInsert( int FlaggedHeapInsert(
...@@ -144,7 +144,7 @@ int FlaggedHeapInsert( ...@@ -144,7 +144,7 @@ int FlaggedHeapInsert(
return 1; return 1;
} }
/*! @brief Build heap for each point. Used by NN-descent */ /** @brief Build heap for each point. Used by NN-descent */
template <typename FloatType, typename IdType> template <typename FloatType, typename IdType>
void BuildHeap(IdType* index, FloatType* dist, int k) { void BuildHeap(IdType* index, FloatType* dist, int k) {
for (int i = k / 2 - 1; i >= 0; --i) { for (int i = k / 2 - 1; i >= 0; --i) {
...@@ -170,7 +170,7 @@ void BuildHeap(IdType* index, FloatType* dist, int k) { ...@@ -170,7 +170,7 @@ void BuildHeap(IdType* index, FloatType* dist, int k) {
} }
} }
/*! /**
* @brief Neighbor update process in NN-descent. The distance between * @brief Neighbor update process in NN-descent. The distance between
* two points are computed. If this new distance is less than any worst * two points are computed. If this new distance is less than any worst
* distance of these two points, we update the neighborhood of that point. * distance of these two points, we update the neighborhood of that point.
...@@ -208,7 +208,7 @@ int UpdateNeighbors( ...@@ -208,7 +208,7 @@ int UpdateNeighbors(
return num_updates; return num_updates;
} }
/*! @brief The kd-tree implementation of K-Nearest Neighbors */ /** @brief The kd-tree implementation of K-Nearest Neighbors */
template <typename FloatType, typename IdType> template <typename FloatType, typename IdType>
void KdTreeKNN( void KdTreeKNN(
const NDArray& data_points, const IdArray& data_offsets, const NDArray& data_points, const IdArray& data_offsets,
......
/*! /**
* Copyright 2021 Contributors * Copyright 2021 Contributors
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
......
/*! /**
* Copyright 2020-2021 Contributors * Copyright 2020-2021 Contributors
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
......
/*! /**
* Copyright 2020-2021 Contributors * Copyright 2020-2021 Contributors
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
......
/*! /**
* Copyright (c) 2020 by Contributors * Copyright (c) 2020 by Contributors
* @file graph/transform/cuda/knn.cu * @file graph/transform/cuda/knn.cu
* @brief k-nearest-neighbor (KNN) implementation (cuda) * @brief k-nearest-neighbor (KNN) implementation (cuda)
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
namespace dgl { namespace dgl {
namespace transform { namespace transform {
namespace impl { namespace impl {
/*! /**
* @brief Utility class used to avoid linker errors with extern * @brief Utility class used to avoid linker errors with extern
* unsized shared memory arrays with templated type * unsized shared memory arrays with templated type
*/ */
...@@ -54,7 +54,7 @@ struct SharedMemory<double> { ...@@ -54,7 +54,7 @@ struct SharedMemory<double> {
} }
}; };
/*! @brief Compute Euclidean distance between two vectors in a cuda kernel */ /** @brief Compute Euclidean distance between two vectors in a cuda kernel */
template <typename FloatType, typename IdType> template <typename FloatType, typename IdType>
__device__ FloatType __device__ FloatType
EuclideanDist(const FloatType* vec1, const FloatType* vec2, const int64_t dim) { EuclideanDist(const FloatType* vec1, const FloatType* vec2, const int64_t dim) {
...@@ -77,7 +77,7 @@ EuclideanDist(const FloatType* vec1, const FloatType* vec2, const int64_t dim) { ...@@ -77,7 +77,7 @@ EuclideanDist(const FloatType* vec1, const FloatType* vec2, const int64_t dim) {
return dist; return dist;
} }
/*! /**
* @brief Compute Euclidean distance between two vectors in a cuda kernel, * @brief Compute Euclidean distance between two vectors in a cuda kernel,
* return positive infinite value if the intermediate distance is greater * return positive infinite value if the intermediate distance is greater
* than the worst distance. * than the worst distance.
...@@ -238,7 +238,7 @@ __device__ bool FlaggedHeapInsert( ...@@ -238,7 +238,7 @@ __device__ bool FlaggedHeapInsert(
return true; return true;
} }
/*! /**
* @brief Brute force kNN kernel. Compute distance for each pair of input points * @brief Brute force kNN kernel. Compute distance for each pair of input points
* and get the result directly (without a distance matrix). * and get the result directly (without a distance matrix).
*/ */
...@@ -278,7 +278,7 @@ __global__ void BruteforceKnnKernel( ...@@ -278,7 +278,7 @@ __global__ void BruteforceKnnKernel(
} }
} }
/*! /**
* @brief Same as BruteforceKnnKernel, but use shared memory as buffer. * @brief Same as BruteforceKnnKernel, but use shared memory as buffer.
* This kernel divides query points and data points into blocks. For each * This kernel divides query points and data points into blocks. For each
* query block, it will make a loop over all data blocks and compute distances. * query block, it will make a loop over all data blocks and compute distances.
...@@ -400,7 +400,7 @@ __global__ void BruteforceKnnShareKernel( ...@@ -400,7 +400,7 @@ __global__ void BruteforceKnnShareKernel(
} }
} }
/*! @brief determine the number of blocks for each segment */ /** @brief determine the number of blocks for each segment */
template <typename IdType> template <typename IdType>
__global__ void GetNumBlockPerSegment( __global__ void GetNumBlockPerSegment(
const IdType* offsets, IdType* out, const int64_t batch_size, const IdType* offsets, IdType* out, const int64_t batch_size,
...@@ -411,7 +411,7 @@ __global__ void GetNumBlockPerSegment( ...@@ -411,7 +411,7 @@ __global__ void GetNumBlockPerSegment(
} }
} }
/*! @brief Get the batch index and local index in segment for each block */ /** @brief Get the batch index and local index in segment for each block */
template <typename IdType> template <typename IdType>
__global__ void GetBlockInfo( __global__ void GetBlockInfo(
const IdType* num_block_prefixsum, IdType* block_batch_id, const IdType* num_block_prefixsum, IdType* block_batch_id,
...@@ -429,7 +429,7 @@ __global__ void GetBlockInfo( ...@@ -429,7 +429,7 @@ __global__ void GetBlockInfo(
} }
} }
/*! /**
* @brief Brute force kNN. Compute distance for each pair of input points and * @brief Brute force kNN. Compute distance for each pair of input points and
* get the result directly (without a distance matrix). * get the result directly (without a distance matrix).
* *
...@@ -472,7 +472,7 @@ void BruteForceKNNCuda( ...@@ -472,7 +472,7 @@ void BruteForceKNNCuda(
device->FreeWorkspace(ctx, dists); device->FreeWorkspace(ctx, dists);
} }
/*! /**
* @brief Brute force kNN with shared memory. * @brief Brute force kNN with shared memory.
* This function divides query points and data points into blocks. For each * This function divides query points and data points into blocks. For each
* query block, it will make a loop over all data blocks and compute distances. * query block, it will make a loop over all data blocks and compute distances.
...@@ -575,7 +575,7 @@ void BruteForceKNNSharedCuda( ...@@ -575,7 +575,7 @@ void BruteForceKNNSharedCuda(
device->FreeWorkspace(ctx, block_batch_id); device->FreeWorkspace(ctx, block_batch_id);
} }
/*! @brief Setup rng state for nn-descent */ /** @brief Setup rng state for nn-descent */
__global__ void SetupRngKernel( __global__ void SetupRngKernel(
curandState* states, const uint64_t seed, const size_t n) { curandState* states, const uint64_t seed, const size_t n) {
size_t id = blockIdx.x * blockDim.x + threadIdx.x; size_t id = blockIdx.x * blockDim.x + threadIdx.x;
...@@ -584,7 +584,7 @@ __global__ void SetupRngKernel( ...@@ -584,7 +584,7 @@ __global__ void SetupRngKernel(
} }
} }
/*! /**
* @brief Randomly initialize neighbors (sampling without replacement) * @brief Randomly initialize neighbors (sampling without replacement)
* for each nodes * for each nodes
*/ */
...@@ -636,7 +636,7 @@ __global__ void RandomInitNeighborsKernel( ...@@ -636,7 +636,7 @@ __global__ void RandomInitNeighborsKernel(
BuildHeap<FloatType, IdType>(neighbors + point_idx * k, current_dists, k); BuildHeap<FloatType, IdType>(neighbors + point_idx * k, current_dists, k);
} }
/*! /**
* @brief Randomly select candidates from current knn and reverse-knn graph for * @brief Randomly select candidates from current knn and reverse-knn graph for
* nn-descent. * nn-descent.
*/ */
...@@ -735,7 +735,7 @@ __global__ void FindCandidatesKernel( ...@@ -735,7 +735,7 @@ __global__ void FindCandidatesKernel(
} }
} }
/*! @brief Update knn graph according to selected candidates for nn-descent */ /** @brief Update knn graph according to selected candidates for nn-descent */
template <typename FloatType, typename IdType> template <typename FloatType, typename IdType>
__global__ void UpdateNeighborsKernel( __global__ void UpdateNeighborsKernel(
const FloatType* points, const IdType* offsets, IdType* neighbors, const FloatType* points, const IdType* offsets, IdType* neighbors,
......
/*! /**
* Copyright (c) 2019 by Contributors * Copyright (c) 2019 by Contributors
* @file graph/transform/knn.cc * @file graph/transform/knn.cc
* @brief k-nearest-neighbor (KNN) interface * @brief k-nearest-neighbor (KNN) interface
......
/*! /**
* Copyright (c) 2021 by Contributors * Copyright (c) 2021 by Contributors
* @file graph/transform/knn.h * @file graph/transform/knn.h
* @brief k-nearest-neighbor (KNN) implementation * @brief k-nearest-neighbor (KNN) implementation
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
namespace dgl { namespace dgl {
namespace transform { namespace transform {
/*! /**
* @brief For each point in each segment in \a query_points, find \a k nearest * @brief For each point in each segment in \a query_points, find \a k nearest
* points in the same segment in \a data_points. \a data_offsets and \a * points in the same segment in \a data_points. \a data_offsets and \a
* query_offsets determine the start index of each segment in \a * query_offsets determine the start index of each segment in \a
...@@ -35,7 +35,7 @@ void KNN( ...@@ -35,7 +35,7 @@ void KNN(
const NDArray& query_points, const IdArray& query_offsets, const int k, const NDArray& query_points, const IdArray& query_offsets, const int k,
IdArray result, const std::string& algorithm); IdArray result, const std::string& algorithm);
/*! /**
* @brief For each input point, find \a k approximate nearest points in the same * @brief For each input point, find \a k approximate nearest points in the same
* segment using NN-descent algorithm. * segment using NN-descent algorithm.
* *
......
/*! /**
* Copyright (c) 2020 by Contributors * Copyright (c) 2020 by Contributors
* @file graph/transform/line_graph.cc * @file graph/transform/line_graph.cc
* @brief Line graph implementation * @brief Line graph implementation
...@@ -22,7 +22,7 @@ using namespace dgl::aten; ...@@ -22,7 +22,7 @@ using namespace dgl::aten;
namespace transform { namespace transform {
/*! /**
* @brief Create Line Graph. * @brief Create Line Graph.
* @param hg Graph. * @param hg Graph.
* @param backtracking whether the pair of (v, u) (u, v) edges are treated as * @param backtracking whether the pair of (v, u) (u, v) edges are treated as
......
/*! /**
* Copyright (c) 2020 by Contributors * Copyright (c) 2020 by Contributors
* @file graph/metis_partition.cc * @file graph/metis_partition.cc
* @brief Call Metis partitioning * @brief Call Metis partitioning
......
/*! /**
* Copyright (c) 2020 by Contributors * Copyright (c) 2020 by Contributors
* @file graph/metis_partition.cc * @file graph/metis_partition.cc
* @brief Call Metis partitioning * @brief Call Metis partitioning
......
/*! /**
* Copyright (c) 2019 by Contributors * Copyright (c) 2019 by Contributors
* @file graph/transform/remove_edges.cc * @file graph/transform/remove_edges.cc
* @brief Remove edges. * @brief Remove edges.
......
/*! /**
* Copyright 2019-2021 Contributors * Copyright 2019-2021 Contributors
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
......
/*! /**
* Copyright 2021 Contributors * Copyright 2021 Contributors
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
......
/*! /**
* Copyright (c) 2019 by Contributors * Copyright (c) 2019 by Contributors
* @file graph/transform/to_simple.cc * @file graph/transform/to_simple.cc
* @brief Convert multigraphs to simple graphs * @brief Convert multigraphs to simple graphs
......
/*! /**
* Copyright (c) 2020 by Contributors * Copyright (c) 2020 by Contributors
* @file graph/transform/union_partition.cc * @file graph/transform/union_partition.cc
* @brief Functions for partition, union multiple graphs. * @brief Functions for partition, union multiple graphs.
......
/*! /**
* Copyright (c) 2018 by Contributors * Copyright (c) 2018 by Contributors
* @file graph/traversal.cc * @file graph/traversal.cc
* @brief Graph traversal implementation * @brief Graph traversal implementation
...@@ -88,7 +88,7 @@ IdArray ComputeMergedSections(const std::vector<std::vector<DType>>& traces) { ...@@ -88,7 +88,7 @@ IdArray ComputeMergedSections(const std::vector<std::vector<DType>>& traces) {
} // namespace } // namespace
/*! /**
* @brief Class for representing frontiers. * @brief Class for representing frontiers.
* *
* Each frontier is a list of nodes/edges (specified by their ids). * Each frontier is a list of nodes/edges (specified by their ids).
...@@ -96,13 +96,13 @@ IdArray ComputeMergedSections(const std::vector<std::vector<DType>>& traces) { ...@@ -96,13 +96,13 @@ IdArray ComputeMergedSections(const std::vector<std::vector<DType>>& traces) {
* value). * value).
*/ */
struct Frontiers { struct Frontiers {
/*!\brief a vector store for the nodes/edges in all the frontiers */ /** @brief a vector store for the nodes/edges in all the frontiers */
std::vector<dgl_id_t> ids; std::vector<dgl_id_t> ids;
/*!\brief a vector store for node/edge tags. Empty if no tags are requested */ /** @brief a vector store for node/edge tags. Empty if no tags are requested */
std::vector<int64_t> tags; std::vector<int64_t> tags;
/*!\brief a section vector to indicate each frontier */ /** @brief a section vector to indicate each frontier */
std::vector<int64_t> sections; std::vector<int64_t> sections;
}; };
......
/*! /**
* Copyright (c) 2018 by Contributors * Copyright (c) 2018 by Contributors
* @file graph/traversal.h * @file graph/traversal.h
* @brief Graph traversal routines. * @brief Graph traversal routines.
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
namespace dgl { namespace dgl {
namespace traverse { namespace traverse {
/*! /**
* @brief Traverse the graph in a breadth-first-search (BFS) order. * @brief Traverse the graph in a breadth-first-search (BFS) order.
* *
* The queue object must suffice following interface: * The queue object must suffice following interface:
...@@ -81,7 +81,7 @@ void BFSNodes( ...@@ -81,7 +81,7 @@ void BFSNodes(
} }
} }
/*! /**
* @brief Traverse the graph in a breadth-first-search (BFS) order, returning * @brief Traverse the graph in a breadth-first-search (BFS) order, returning
* the edges of the BFS tree. * the edges of the BFS tree.
* *
...@@ -145,7 +145,7 @@ void BFSEdges( ...@@ -145,7 +145,7 @@ void BFSEdges(
} }
} }
/*! /**
* @brief Traverse the graph in topological order. * @brief Traverse the graph in topological order.
* *
* The queue object must suffice following interface: * The queue object must suffice following interface:
...@@ -212,13 +212,13 @@ void TopologicalNodes( ...@@ -212,13 +212,13 @@ void TopologicalNodes(
} }
} }
/*!\brief Tags for ``DFSEdges``. */ /** @brief Tags for ``DFSEdges``. */
enum DFSEdgeTag { enum DFSEdgeTag {
kForward = 0, kForward = 0,
kReverse, kReverse,
kNonTree, kNonTree,
}; };
/*! /**
* @brief Traverse the graph in a depth-first-search (DFS) order. * @brief Traverse the graph in a depth-first-search (DFS) order.
* *
* The traversal visit edges in its DFS order. Edges have three tags: * The traversal visit edges in its DFS order. Edges have three tags:
......
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