Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kazimuth committed Apr 10, 2019
1 parent ddbd4cb commit 78a26b5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
15 changes: 14 additions & 1 deletion include/tvm/runtime/registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ class Registry {
* \endcode
*
* \param f The function to forward to.
* \tparam FType the signature of the function.
* \tparam R the return type of the function (inferred).
* \tparam Args the argument types of the function (inferred).
*/
template<typename R, typename ...Args>
Registry& set_body_typed(R (*f)(Args...)) {
Expand All @@ -125,6 +126,9 @@ class Registry {
* \endcode
*
* \param f the method pointer to forward to.
* \tparam T the type containing the method (inferred).
* \tparam R the return type of the function (inferred).
* \tparam Args the argument types of the function (inferred).
*/
template<typename T, typename R, typename ...Args>
Registry& set_body_method(R (T::*f)(Args...)) {
Expand All @@ -150,6 +154,9 @@ class Registry {
* \endcode
*
* \param f the method pointer to forward to.
* \tparam T the type containing the method (inferred).
* \tparam R the return type of the function (inferred).
* \tparam Args the argument types of the function (inferred).
*/
template<typename T, typename R, typename ...Args>
Registry& set_body_method(R (T::*f)(Args...) const) {
Expand Down Expand Up @@ -185,6 +192,9 @@ class Registry {
*
* \param f the method pointer to forward to.
* \tparam TNodeRef the node reference type to call the method on
* \tparam TNode the node type containing the method (inferred).
* \tparam R the return type of the function (inferred).
* \tparam Args the argument types of the function (inferred).
*/
template<typename TNodeRef, typename TNode, typename R, typename ...Args,
typename = typename std::enable_if<std::is_base_of<NodeRef, TNodeRef>::value>::type>
Expand Down Expand Up @@ -222,6 +232,9 @@ class Registry {
*
* \param f the method pointer to forward to.
* \tparam TNodeRef the node reference type to call the method on
* \tparam TNode the node type containing the method (inferred).
* \tparam R the return type of the function (inferred).
* \tparam Args the argument types of the function (inferred).
*/
template<typename TNodeRef, typename TNode, typename R, typename ...Args,
typename = typename std::enable_if<std::is_base_of<NodeRef, TNodeRef>::value>::type>
Expand Down
1 change: 0 additions & 1 deletion src/api/api_codegen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,5 @@ TVM_REGISTER_API("codegen._Build")

TVM_REGISTER_API("module._PackImportsToC")
.set_body_typed(PackImportsToC);

} // namespace codegen
} // namespace tvm

0 comments on commit 78a26b5

Please sign in to comment.