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 (c) 2017 by Contributors * Copyright (c) 2017 by Contributors
* @file file_util.cc * @file file_util.cc
*/ */
......
/*! /**
* 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.
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
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.
...@@ -21,40 +21,40 @@ namespace runtime { ...@@ -21,40 +21,40 @@ namespace runtime {
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.
...@@ -63,7 +63,7 @@ void SaveMetaDataToFile( ...@@ -63,7 +63,7 @@ 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.
......
/*! /**
* 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
...@@ -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
......
/*! /**
* 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.
......
/*! /**
* 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
...@@ -20,21 +20,21 @@ typedef int (*BackendPackedCFunc)(void* args, int* type_codes, int num_args); ...@@ -20,21 +20,21 @@ 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*
......
/*! /**
* 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.
......
/*! /**
* 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.
......
/*! /**
* 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
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,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.
*/ */
...@@ -31,7 +31,7 @@ union ArgUnion { ...@@ -31,7 +31,7 @@ union ArgUnion {
uint32_t v_uint32; uint32_t v_uint32;
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)
...@@ -43,7 +43,7 @@ union ArgUnion { ...@@ -43,7 +43,7 @@ union ArgUnion {
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.
* *
...@@ -56,7 +56,7 @@ inline PackedFunc PackFuncVoidAddr( ...@@ -56,7 +56,7 @@ inline PackedFunc PackFuncVoidAddr(
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.
* *
...@@ -70,7 +70,7 @@ inline PackedFunc PackFuncNonBufferArg( ...@@ -70,7 +70,7 @@ inline PackedFunc PackFuncNonBufferArg(
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
...@@ -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
......
/*! /**
* 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.
...@@ -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.
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
namespace dgl { namespace dgl {
namespace runtime { namespace runtime {
/* /**
* The runtime allocates resources during the computation. Some of the resources * The runtime allocates resources during the computation. Some of the resources
* cannot be destroyed after the process exits especially when the process * cannot be destroyed after the process exits especially when the process
* doesn't exits normally. We need to keep track of the resources in the system * doesn't exits normally. We need to keep track of the resources in the system
......
/*! /**
* 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.
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
namespace dgl { namespace dgl {
namespace runtime { namespace runtime {
/* /**
* A class that provides the interface to describe a resource that can be * A class that provides the interface to describe a resource that can be
* managed by a resource manager. Some of the resources cannot be free'd * managed by a resource manager. Some of the resources cannot be free'd
* automatically when the process exits, especially when the process doesn't * automatically when the process exits, especially when the process doesn't
......
/*! /**
* 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
...@@ -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() \
} \ } \
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
return DGLAPIHandleException(_except_); \ return DGLAPIHandleException(_except_); \
} \ } \
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
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
} \ } \
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
......
/*! /**
* 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
......
/*! /**
* 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
...@@ -15,26 +15,26 @@ ...@@ -15,26 +15,26 @@
namespace dgl { 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.
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
namespace dgl { namespace dgl {
namespace runtime { namespace runtime {
/* /**
* Shared memory is a resource that cannot be cleaned up if the process doesn't * Shared memory is a resource that cannot be cleaned up if the process doesn't
* exit normally. We'll manage the resource with ResourceManager. * exit normally. We'll manage the resource with ResourceManager.
*/ */
......
/*! /**
* 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.
......
/*! /**
* 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
......
/*! /**
* Copyright (c) 2017 by Contributors * Copyright (c) 2017 by Contributors
* @file thread_pool.cc * @file thread_pool.cc
* @brief Threadpool for multi-threading runtime. * @brief Threadpool for multi-threading runtime.
...@@ -30,7 +30,7 @@ namespace runtime { ...@@ -30,7 +30,7 @@ namespace runtime {
// stride in the page, fit to cache line. // stride in the page, fit to cache line.
constexpr int kSyncStride = 64 / sizeof(std::atomic<int>); constexpr int kSyncStride = 64 / sizeof(std::atomic<int>);
/*! /**
* @brief Thread local master environment. * @brief Thread local master environment.
*/ */
class ParallelLauncher { class ParallelLauncher {
...@@ -112,10 +112,10 @@ class ParallelLauncher { ...@@ -112,10 +112,10 @@ class ParallelLauncher {
std::vector<std::string> par_errors_; std::vector<std::string> par_errors_;
}; };
/*! @brief Lock-free single-producer-single-consumer queue for each thread */ /** @brief Lock-free single-producer-single-consumer queue for each thread */
class SpscTaskQueue { class SpscTaskQueue {
public: public:
/*! @brief The task entry */ /** @brief The task entry */
struct Task { struct Task {
ParallelLauncher* launcher; ParallelLauncher* launcher;
int32_t task_id; int32_t task_id;
...@@ -125,7 +125,7 @@ class SpscTaskQueue { ...@@ -125,7 +125,7 @@ class SpscTaskQueue {
~SpscTaskQueue() { delete[] buffer_; } ~SpscTaskQueue() { delete[] buffer_; }
/*! /**
* @brief Push a task into the queue and notify the comsumer if it is on wait. * @brief Push a task into the queue and notify the comsumer if it is on wait.
* @param input The task to be dequeued. * @param input The task to be dequeued.
*/ */
...@@ -139,7 +139,7 @@ class SpscTaskQueue { ...@@ -139,7 +139,7 @@ class SpscTaskQueue {
} }
} }
/*! /**
* @brief Pop a task out of the queue and condition wait if no tasks. * @brief Pop a task out of the queue and condition wait if no tasks.
* @param output The pointer to the task to be dequeued. * @param output The pointer to the task to be dequeued.
* @param spin_count The number of iterations to spin before sleep. * @param spin_count The number of iterations to spin before sleep.
...@@ -169,7 +169,7 @@ class SpscTaskQueue { ...@@ -169,7 +169,7 @@ class SpscTaskQueue {
return true; return true;
} }
/*! /**
* @brief Signal to terminate the worker. * @brief Signal to terminate the worker.
*/ */
void SignalForKill() { void SignalForKill() {
...@@ -179,7 +179,7 @@ class SpscTaskQueue { ...@@ -179,7 +179,7 @@ class SpscTaskQueue {
} }
protected: protected:
/*! /**
* @brief Lock-free enqueue. * @brief Lock-free enqueue.
* @param input The task to be enqueued. * @param input The task to be enqueued.
* @return Whether the task is enqueued. * @return Whether the task is enqueued.
......
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