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
* @file file_util.cc
*/
......
/*!
/**
* Copyright (c) 2017 by Contributors
* @file file_util.h
* @brief Minimum file manipulation util for runtime.
......@@ -13,7 +13,7 @@
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.
......@@ -21,40 +21,40 @@ namespace runtime {
std::string GetFileFormat(
const std::string& file_name, const std::string& format);
/*!
/**
* @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.
*/
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
*/
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.
*/
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.
*/
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.
......@@ -63,7 +63,7 @@ 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.
......
/*!
/**
* Copyright (c) 2017 by Contributors
* @file meta_data.h
* @brief Meta data related utilities
......@@ -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
......
/*!
/**
* Copyright (c) 2017 by Contributors
* @file module_util.cc
* @brief Utilities for module.
......
/*!
/**
* Copyright (c) 2017 by Contributors
* @file module_util.h
* @brief Helper utilities for module building
......@@ -20,21 +20,21 @@ 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.
*/
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
*/
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*
......
/*!
/**
* Copyright (c) 2017-2022 by Contributors
* @file ndarray.cc
* @brief NDArray container infratructure.
......
/*!
/**
* Copyright (c) 2019 by Contributors
* @file runtime/object.cc
* @brief Implementation of runtime object APIs.
......
/*!
/**
* Copyright (c) 2017 by Contributors
* @file pack_args.h
* @brief Utility to pack DGLArgs to other type-erased fution calling
......@@ -22,7 +22,7 @@
namespace dgl {
namespace runtime {
/*!
/**
* @brief argument union type of 32bit.
* Choose 32 bit because most GPU API do not work well with 64 bit.
*/
......@@ -31,7 +31,7 @@ union ArgUnion {
uint32_t v_uint32;
float v_float32;
};
/*!
/**
* @brief Create a packed function from void addr types.
*
* @param f with signiture (DGLArgs args, DGLRetValue* rv, void* void_args)
......@@ -43,7 +43,7 @@ union ArgUnion {
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
* arguments.
*
......@@ -56,7 +56,7 @@ inline PackedFunc PackFuncVoidAddr(
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
* arguments.
*
......@@ -70,7 +70,7 @@ inline PackedFunc PackFuncNonBufferArg(
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
......@@ -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
......
/*!
/**
* Copyright (c) 2017 by Contributors
* @file registry.cc
* @brief The global registry of packed function.
......@@ -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.
......@@ -13,7 +13,7 @@
namespace dgl {
namespace runtime {
/*
/**
* The runtime allocates resources during the computation. Some of the resources
* 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
......
/*!
/**
* Copyright (c) 2020 by Contributors
* @file resource_manager.h
* @brief Manage the resources in the runtime system.
......@@ -13,7 +13,7 @@
namespace dgl {
namespace runtime {
/*
/**
* 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
* automatically when the process exits, especially when the process doesn't
......
/*!
/**
* Copyright (c) 2016 by Contributors
* @file runtime_base.h
* @brief Base of all C APIs
......@@ -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() \
} \
......@@ -20,7 +20,7 @@
return DGLAPIHandleException(_except_); \
} \
return 0; // NOLINT(*)
/*!
/**
* @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
......@@ -34,7 +34,7 @@
} \
return 0; // NOLINT(*)
/*!
/**
* @brief handle exception throwed out
* @param e the exception
* @return the return value of API after exception is handled
......
/*!
/**
* Copyright (c) 2021 by Contributors
* @file semaphore_wrapper.cc
* @brief A simple corss platform semaphore wrapper
......
/*!
/**
* Copyright (c) 2021 by Contributors
* @file semaphore_wrapper.h
* @brief A simple corss platform semaphore wrapper
......@@ -15,26 +15,26 @@
namespace dgl {
namespace runtime {
/*!
/**
* @brief A simple crossplatform Semaphore wrapper
*/
class Semaphore {
public:
/*!
/**
* @brief Semaphore constructor
*/
Semaphore();
/*!
/**
* @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
* indefinitely.
*/
bool TimedWait(int timeout);
/*!
/**
* @brief increase semaphore by 1
*/
void Post();
......
/*!
/**
* Copyright (c) 2019 by Contributors
* @file shared_mem.cc
* @brief Shared memory management.
......@@ -18,7 +18,7 @@
namespace dgl {
namespace runtime {
/*
/**
* Shared memory is a resource that cannot be cleaned up if the process doesn't
* exit normally. We'll manage the resource with ResourceManager.
*/
......
/*!
/**
* Copyright (c) 2017 by Contributors
* @file system_lib_module.cc
* @brief SystemLib module.
......
/*!
/**
* Copyright (c) 2019 by Contributors
* @file runtime/tensordispatch.cc
* @brief Adapter library caller
......
/*!
/**
* Copyright (c) 2017 by Contributors
* @file thread_pool.cc
* @brief Threadpool for multi-threading runtime.
......@@ -30,7 +30,7 @@ namespace runtime {
// stride in the page, fit to cache line.
constexpr int kSyncStride = 64 / sizeof(std::atomic<int>);
/*!
/**
* @brief Thread local master environment.
*/
class ParallelLauncher {
......@@ -112,10 +112,10 @@ class ParallelLauncher {
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 {
public:
/*! @brief The task entry */
/** @brief The task entry */
struct Task {
ParallelLauncher* launcher;
int32_t task_id;
......@@ -125,7 +125,7 @@ class SpscTaskQueue {
~SpscTaskQueue() { delete[] buffer_; }
/*!
/**
* @brief Push a task into the queue and notify the comsumer if it is on wait.
* @param input The task to be dequeued.
*/
......@@ -139,7 +139,7 @@ class SpscTaskQueue {
}
}
/*!
/**
* @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 spin_count The number of iterations to spin before sleep.
......@@ -169,7 +169,7 @@ class SpscTaskQueue {
return true;
}
/*!
/**
* @brief Signal to terminate the worker.
*/
void SignalForKill() {
......@@ -179,7 +179,7 @@ class SpscTaskQueue {
}
protected:
/*!
/**
* @brief Lock-free enqueue.
* @param input The task to be 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