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) 2017 by Contributors * Copyright (c) 2017 by Contributors
* \file dso_dll_module.cc * @file dso_dll_module.cc
* \brief Module to load from dynamic shared library. * @brief Module to load from dynamic shared library.
*/ */
#include <dgl/runtime/module.h> #include <dgl/runtime/module.h>
#include <dgl/runtime/packed_func.h> #include <dgl/runtime/packed_func.h>
......
/*! /*!
* Copyright (c) 2017 by Contributors * Copyright (c) 2017 by Contributors
* \file file_util.cc * @file file_util.cc
*/ */
#include "file_util.h" #include "file_util.h"
......
/*! /*!
* Copyright (c) 2017 by Contributors * Copyright (c) 2017 by Contributors
* \file file_util.h * @file file_util.h
* \brief Minimum file manipulation util for runtime. * @brief Minimum file manipulation util for runtime.
*/ */
#ifndef DGL_RUNTIME_FILE_UTIL_H_ #ifndef DGL_RUNTIME_FILE_UTIL_H_
#define DGL_RUNTIME_FILE_UTIL_H_ #define DGL_RUNTIME_FILE_UTIL_H_
...@@ -14,59 +14,59 @@ ...@@ -14,59 +14,59 @@
namespace dgl { namespace dgl {
namespace runtime { namespace runtime {
/*! /*!
* \brief Get file format from given file name or format argument. * @brief Get file format from given file name or format argument.
* \param file_name The name of the file. * @param file_name The name of the file.
* \param format The format of the file. * @param format The format of the file.
*/ */
std::string GetFileFormat( std::string GetFileFormat(
const std::string& file_name, const std::string& format); const std::string& file_name, const std::string& format);
/*! /*!
* \return the directory in which DGL stores cached files. * @return the directory in which DGL stores cached files.
* May be set using DGL_CACHE_DIR; defaults to system locations. * May be set using DGL_CACHE_DIR; defaults to system locations.
*/ */
std::string GetCacheDir(); std::string GetCacheDir();
/*! /*!
* \brief Get meta file path given file name and format. * @brief Get meta file path given file name and format.
* \param file_name The name of the file. * @param file_name The name of the file.
*/ */
std::string GetMetaFilePath(const std::string& file_name); std::string GetMetaFilePath(const std::string& file_name);
/*! /*!
* \brief Get file basename (i.e. without leading directories) * @brief Get file basename (i.e. without leading directories)
* \param file_name The name of the file. * @param file_name The name of the file.
* \return the base name * @return the base name
*/ */
std::string GetFileBasename(const std::string& file_name); std::string GetFileBasename(const std::string& file_name);
/*! /*!
* \brief Load binary file into a in-memory buffer. * @brief Load binary file into a in-memory buffer.
* \param file_name The name of the file. * @param file_name The name of the file.
* \param data The data to be loaded. * @param data The data to be loaded.
*/ */
void LoadBinaryFromFile(const std::string& file_name, std::string* data); void LoadBinaryFromFile(const std::string& file_name, std::string* data);
/*! /*!
* \brief Load binary file into a in-memory buffer. * @brief Load binary file into a in-memory buffer.
* \param file_name The name of the file. * @param file_name The name of the file.
* \param data The binary data to be saved. * @param data The binary data to be saved.
*/ */
void SaveBinaryToFile(const std::string& file_name, const std::string& data); void SaveBinaryToFile(const std::string& file_name, const std::string& data);
/*! /*!
* \brief Save meta data to file. * @brief Save meta data to file.
* \param file_name The name of the file. * @param file_name The name of the file.
* \param fmap The function info map. * @param fmap The function info map.
*/ */
void SaveMetaDataToFile( void SaveMetaDataToFile(
const std::string& file_name, const std::string& file_name,
const std::unordered_map<std::string, FunctionInfo>& fmap); const std::unordered_map<std::string, FunctionInfo>& fmap);
/*! /*!
* \brief Load meta data to file. * @brief Load meta data to file.
* \param file_name The name of the file. * @param file_name The name of the file.
* \param fmap The function info map. * @param fmap The function info map.
*/ */
void LoadMetaDataFromFile( void LoadMetaDataFromFile(
const std::string& file_name, const std::string& file_name,
......
/*! /*!
* Copyright (c) 2017 by Contributors * Copyright (c) 2017 by Contributors
* \file meta_data.h * @file meta_data.h
* \brief Meta data related utilities * @brief Meta data related utilities
*/ */
#ifndef DGL_RUNTIME_META_DATA_H_ #ifndef DGL_RUNTIME_META_DATA_H_
#define DGL_RUNTIME_META_DATA_H_ #define DGL_RUNTIME_META_DATA_H_
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
namespace dgl { namespace dgl {
namespace runtime { namespace runtime {
/*! \brief function information needed by device */ /*! @brief function information needed by device */
struct FunctionInfo { struct FunctionInfo {
std::string name; std::string name;
std::vector<DGLDataType> arg_types; std::vector<DGLDataType> arg_types;
......
/*! /*!
* Copyright (c) 2017 by Contributors * Copyright (c) 2017 by Contributors
* \file module.cc * @file module.cc
* \brief DGL module system * @brief DGL module system
*/ */
#include <dgl/runtime/module.h> #include <dgl/runtime/module.h>
#include <dgl/runtime/packed_func.h> #include <dgl/runtime/packed_func.h>
......
/*! /*!
* Copyright (c) 2017 by Contributors * Copyright (c) 2017 by Contributors
* \file module_util.cc * @file module_util.cc
* \brief Utilities for module. * @brief Utilities for module.
*/ */
#ifndef _LIBCPP_SGX_CONFIG #ifndef _LIBCPP_SGX_CONFIG
#include <dmlc/memory_io.h> #include <dmlc/memory_io.h>
......
/*! /*!
* Copyright (c) 2017 by Contributors * Copyright (c) 2017 by Contributors
* \file module_util.h * @file module_util.h
* \brief Helper utilities for module building * @brief Helper utilities for module building
*/ */
#ifndef DGL_RUNTIME_MODULE_UTIL_H_ #ifndef DGL_RUNTIME_MODULE_UTIL_H_
#define DGL_RUNTIME_MODULE_UTIL_H_ #define DGL_RUNTIME_MODULE_UTIL_H_
...@@ -21,23 +21,23 @@ typedef int (*BackendPackedCFunc)(void* args, int* type_codes, int num_args); ...@@ -21,23 +21,23 @@ typedef int (*BackendPackedCFunc)(void* args, int* type_codes, int num_args);
namespace dgl { namespace dgl {
namespace runtime { namespace runtime {
/*! /*!
* \brief Wrap a BackendPackedCFunc to packed function. * @brief Wrap a BackendPackedCFunc to packed function.
* \param faddr The function address * @param faddr The function address
* \param mptr The module pointer node. * @param mptr The module pointer node.
*/ */
PackedFunc WrapPackedFunc( PackedFunc WrapPackedFunc(
BackendPackedCFunc faddr, const std::shared_ptr<ModuleNode>& mptr); BackendPackedCFunc faddr, const std::shared_ptr<ModuleNode>& mptr);
/*! /*!
* \brief Load and append module blob to module list * @brief Load and append module blob to module list
* \param mblob The module blob. * @param mblob The module blob.
* \param module_list The module list to append to * @param module_list The module list to append to
*/ */
void ImportModuleBlob(const char* mblob, std::vector<Module>* module_list); void ImportModuleBlob(const char* mblob, std::vector<Module>* module_list);
/*! /*!
* \brief Utility to initialize conext function symbols during startup * @brief Utility to initialize conext function symbols during startup
* \param flookup A symbol lookup function. * @param flookup A symbol lookup function.
* \tparam FLookup a function of signature string->void* * @tparam FLookup a function of signature string->void*
*/ */
template <typename FLookup> template <typename FLookup>
void InitContextFunctions(FLookup flookup) { void InitContextFunctions(FLookup flookup) {
......
/*! /*!
* Copyright (c) 2017-2022 by Contributors * Copyright (c) 2017-2022 by Contributors
* \file ndarray.cc * @file ndarray.cc
* \brief NDArray container infratructure. * @brief NDArray container infratructure.
*/ */
#include <string.h> #include <string.h>
#include <dmlc/logging.h> #include <dmlc/logging.h>
......
/*! /*!
* Copyright (c) 2019 by Contributors * Copyright (c) 2019 by Contributors
* \file runtime/object.cc * @file runtime/object.cc
* \brief Implementation of runtime object APIs. * @brief Implementation of runtime object APIs.
*/ */
#include <dgl/runtime/object.h> #include <dgl/runtime/object.h>
......
/*! /*!
* Copyright (c) 2017 by Contributors * Copyright (c) 2017 by Contributors
* \file pack_args.h * @file pack_args.h
* \brief Utility to pack DGLArgs to other type-erased fution calling * @brief Utility to pack DGLArgs to other type-erased fution calling
* convention. * convention.
* *
* Two type erased function signatures are supported. * Two type erased function signatures are supported.
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
namespace dgl { namespace dgl {
namespace runtime { namespace runtime {
/*! /*!
* \brief argument union type of 32bit. * @brief argument union type of 32bit.
* Choose 32 bit because most GPU API do not work well with 64 bit. * Choose 32 bit because most GPU API do not work well with 64 bit.
*/ */
union ArgUnion { union ArgUnion {
...@@ -32,48 +32,48 @@ union ArgUnion { ...@@ -32,48 +32,48 @@ union ArgUnion {
float v_float32; float v_float32;
}; };
/*! /*!
* \brief Create a packed function from void addr types. * @brief Create a packed function from void addr types.
* *
* \param f with signiture (DGLArgs args, DGLRetValue* rv, void* void_args) * @param f with signiture (DGLArgs args, DGLRetValue* rv, void* void_args)
* \param arg_types The arguments type information. * @param arg_types The arguments type information.
* \tparam F the function type * @tparam F the function type
* *
* \return The wrapped packed function. * @return The wrapped packed function.
*/ */
template <typename F> template <typename F>
inline PackedFunc PackFuncVoidAddr( inline PackedFunc PackFuncVoidAddr(
F f, const std::vector<DGLDataType>& arg_types); F f, const std::vector<DGLDataType>& arg_types);
/*! /*!
* \brief Create a packed function that from function only packs buffer * @brief Create a packed function that from function only packs buffer
* arguments. * arguments.
* *
* \param f with signiture (DGLArgs args, DGLRetValue* rv, ArgUnion* pack_args) * @param f with signiture (DGLArgs args, DGLRetValue* rv, ArgUnion* pack_args)
* \param arg_types The arguments type information. * @param arg_types The arguments type information.
* \tparam F the function type * @tparam F the function type
* *
* \return The wrapped packed function. * @return The wrapped packed function.
*/ */
template <typename F> template <typename F>
inline PackedFunc PackFuncNonBufferArg( inline PackedFunc PackFuncNonBufferArg(
F f, const std::vector<DGLDataType>& arg_types); F f, const std::vector<DGLDataType>& arg_types);
/*! /*!
* \brief Create a packed function that from function that takes a packed * @brief Create a packed function that from function that takes a packed
* arguments. * arguments.
* *
* \param f with signature (DGLArgs args, DGLRetValue* rv, void* pack_args, * @param f with signature (DGLArgs args, DGLRetValue* rv, void* pack_args,
* size_t nbytes) * size_t nbytes)
* \param arg_types The arguments that wish to get from * @param arg_types The arguments that wish to get from
* \tparam F the function type * @tparam F the function type
* *
* \return The wrapped packed function. * @return The wrapped packed function.
*/ */
template <typename F> template <typename F>
inline PackedFunc PackFuncPackedArg( inline PackedFunc PackFuncPackedArg(
F f, const std::vector<DGLDataType>& arg_types); F f, const std::vector<DGLDataType>& arg_types);
/*! /*!
* \brief Extract number of buffer argument from the argument types. * @brief Extract number of buffer argument from the argument types.
* \param arg_types The argument types. * @param arg_types The argument types.
* \return number of buffer arguments * @return number of buffer arguments
*/ */
inline size_t NumBufferArgs(const std::vector<DGLDataType>& arg_types); inline size_t NumBufferArgs(const std::vector<DGLDataType>& arg_types);
...@@ -98,7 +98,7 @@ class TempArray<T, 0> { ...@@ -98,7 +98,7 @@ class TempArray<T, 0> {
std::vector<T> data_; std::vector<T> data_;
}; };
/*! \brief conversion code used in void arg. */ /*! @brief conversion code used in void arg. */
enum ArgConvertCode { enum ArgConvertCode {
INT64_TO_INT64, INT64_TO_INT64,
INT64_TO_INT32, INT64_TO_INT32,
......
/*! /*!
* Copyright (c) 2016 by Contributors * Copyright (c) 2016 by Contributors
* Implementation of C API (reference: tvm/src/api/c_api.cc) * Implementation of C API (reference: tvm/src/api/c_api.cc)
* \file c_api.cc * @file c_api.cc
*/ */
namespace dgl { namespace dgl {
......
/*! /*!
* Copyright (c) 2017 by Contributors * Copyright (c) 2017 by Contributors
* \file registry.cc * @file registry.cc
* \brief The global registry of packed function. * @brief The global registry of packed function.
*/ */
#include <dgl/runtime/registry.h> #include <dgl/runtime/registry.h>
#include <dmlc/logging.h> #include <dmlc/logging.h>
...@@ -111,15 +111,15 @@ ExtTypeVTable* ExtTypeVTable::RegisterInternal( ...@@ -111,15 +111,15 @@ ExtTypeVTable* ExtTypeVTable::RegisterInternal(
} // namespace runtime } // namespace runtime
} // namespace dgl } // namespace dgl
/*! \brief entry to to easily hold returning information */ /*! @brief entry to to easily hold returning information */
struct DGLFuncThreadLocalEntry { struct DGLFuncThreadLocalEntry {
/*! \brief result holder for returning strings */ /*! @brief result holder for returning strings */
std::vector<std::string> ret_vec_str; std::vector<std::string> ret_vec_str;
/*! \brief result holder for returning string pointers */ /*! @brief result holder for returning string pointers */
std::vector<const char*> ret_vec_charp; std::vector<const char*> ret_vec_charp;
}; };
/*! \brief Thread local store that can be used to hold return values. */ /*! @brief Thread local store that can be used to hold return values. */
typedef dmlc::ThreadLocalStore<DGLFuncThreadLocalEntry> DGLFuncThreadLocalStore; typedef dmlc::ThreadLocalStore<DGLFuncThreadLocalEntry> DGLFuncThreadLocalStore;
int DGLExtTypeFree(void* handle, int type_code) { int DGLExtTypeFree(void* handle, int type_code) {
......
/*! /*!
* Copyright (c) 2020 by Contributors * Copyright (c) 2020 by Contributors
* \file resource_manager.cc * @file resource_manager.cc
* \brief Manage the resources. * @brief Manage the resources.
*/ */
#include "resource_manager.h" #include "resource_manager.h"
......
/*! /*!
* Copyright (c) 2020 by Contributors * Copyright (c) 2020 by Contributors
* \file resource_manager.h * @file resource_manager.h
* \brief Manage the resources in the runtime system. * @brief Manage the resources in the runtime system.
*/ */
#ifndef DGL_RUNTIME_RESOURCE_MANAGER_H_ #ifndef DGL_RUNTIME_RESOURCE_MANAGER_H_
#define DGL_RUNTIME_RESOURCE_MANAGER_H_ #define DGL_RUNTIME_RESOURCE_MANAGER_H_
......
/*! /*!
* Copyright (c) 2016 by Contributors * Copyright (c) 2016 by Contributors
* \file runtime_base.h * @file runtime_base.h
* \brief Base of all C APIs * @brief Base of all C APIs
*/ */
#ifndef DGL_RUNTIME_RUNTIME_BASE_H_ #ifndef DGL_RUNTIME_RUNTIME_BASE_H_
#define DGL_RUNTIME_RUNTIME_BASE_H_ #define DGL_RUNTIME_RUNTIME_BASE_H_
...@@ -10,9 +10,9 @@ ...@@ -10,9 +10,9 @@
#include <stdexcept> #include <stdexcept>
/*! \brief macro to guard beginning and end section of all functions */ /*! @brief macro to guard beginning and end section of all functions */
#define API_BEGIN() try { #define API_BEGIN() try {
/*! \brief every function starts with API_BEGIN(); /*! @brief every function starts with API_BEGIN();
and finishes with API_END() or API_END_HANDLE_ERROR */ and finishes with API_END() or API_END_HANDLE_ERROR */
#define API_END() \ #define API_END() \
} \ } \
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
} \ } \
return 0; // NOLINT(*) return 0; // NOLINT(*)
/*! /*!
* \brief every function starts with API_BEGIN(); * @brief every function starts with API_BEGIN();
* and finishes with API_END() or API_END_HANDLE_ERROR * and finishes with API_END() or API_END_HANDLE_ERROR
* The finally clause contains procedure to cleanup states when an error * The finally clause contains procedure to cleanup states when an error
* happens. * happens.
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
return 0; // NOLINT(*) return 0; // NOLINT(*)
/*! /*!
* \brief handle exception throwed out * @brief handle exception throwed out
* \param e the exception * @param e the exception
* \return the return value of API after exception is handled * @return the return value of API after exception is handled
*/ */
inline int DGLAPIHandleException(const std::runtime_error &e) { inline int DGLAPIHandleException(const std::runtime_error &e) {
DGLAPISetLastError(e.what()); DGLAPISetLastError(e.what());
......
/*! /*!
* Copyright (c) 2021 by Contributors * Copyright (c) 2021 by Contributors
* \file semaphore_wrapper.cc * @file semaphore_wrapper.cc
* \brief A simple corss platform semaphore wrapper * @brief A simple corss platform semaphore wrapper
*/ */
#include "semaphore_wrapper.h" #include "semaphore_wrapper.h"
......
/*! /*!
* Copyright (c) 2021 by Contributors * Copyright (c) 2021 by Contributors
* \file semaphore_wrapper.h * @file semaphore_wrapper.h
* \brief A simple corss platform semaphore wrapper * @brief A simple corss platform semaphore wrapper
*/ */
#ifndef DGL_RUNTIME_SEMAPHORE_WRAPPER_H_ #ifndef DGL_RUNTIME_SEMAPHORE_WRAPPER_H_
#define DGL_RUNTIME_SEMAPHORE_WRAPPER_H_ #define DGL_RUNTIME_SEMAPHORE_WRAPPER_H_
...@@ -16,26 +16,26 @@ namespace dgl { ...@@ -16,26 +16,26 @@ namespace dgl {
namespace runtime { namespace runtime {
/*! /*!
* \brief A simple crossplatform Semaphore wrapper * @brief A simple crossplatform Semaphore wrapper
*/ */
class Semaphore { class Semaphore {
public: public:
/*! /*!
* \brief Semaphore constructor * @brief Semaphore constructor
*/ */
Semaphore(); Semaphore();
/*! /*!
* \brief blocking wait, decrease semaphore by 1 * @brief blocking wait, decrease semaphore by 1
*/ */
void Wait(); void Wait();
/*! /*!
* \brief timed wait, decrease semaphore by 1 or returns if times out * @brief timed wait, decrease semaphore by 1 or returns if times out
* \param timeout The timeout value in milliseconds. If zero, wait * @param timeout The timeout value in milliseconds. If zero, wait
* indefinitely. * indefinitely.
*/ */
bool TimedWait(int timeout); bool TimedWait(int timeout);
/*! /*!
* \brief increase semaphore by 1 * @brief increase semaphore by 1
*/ */
void Post(); void Post();
......
/*! /*!
* Copyright (c) 2019 by Contributors * Copyright (c) 2019 by Contributors
* \file shared_mem.cc * @file shared_mem.cc
* \brief Shared memory management. * @brief Shared memory management.
*/ */
#ifndef _WIN32 #ifndef _WIN32
#include <fcntl.h> #include <fcntl.h>
......
/*! /*!
* Copyright (c) 2017 by Contributors * Copyright (c) 2017 by Contributors
* \file system_lib_module.cc * @file system_lib_module.cc
* \brief SystemLib module. * @brief SystemLib module.
*/ */
#include <dgl/runtime/c_backend_api.h> #include <dgl/runtime/c_backend_api.h>
#include <dgl/runtime/registry.h> #include <dgl/runtime/registry.h>
......
/*! /*!
* Copyright (c) 2019 by Contributors * Copyright (c) 2019 by Contributors
* \file runtime/tensordispatch.cc * @file runtime/tensordispatch.cc
* \brief Adapter library caller * @brief Adapter library caller
*/ */
#include <dgl/packed_func_ext.h> #include <dgl/packed_func_ext.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