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