You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by ju...@apache.org on 2022/08/14 04:15:49 UTC

[tvm] branch main updated: Add `operator()` to `support::With` (#12418)

This is an automated email from the ASF dual-hosted git repository.

junrushao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 24d9d398bb Add `operator()` to `support::With` (#12418)
24d9d398bb is described below

commit 24d9d398bb8da468aa6a7b4db755ce9eedf5c20a
Author: Yaxing Cai <ca...@gmail.com>
AuthorDate: Sat Aug 13 21:15:44 2022 -0700

    Add `operator()` to `support::With` (#12418)
---
 include/tvm/support/with.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/tvm/support/with.h b/include/tvm/support/with.h
index 3651e05e74..bbc36419ff 100644
--- a/include/tvm/support/with.h
+++ b/include/tvm/support/with.h
@@ -75,6 +75,8 @@ class With {
   ContextType& operator*() { return *get(); }
   const ContextType* operator*() const { return *get(); }
 
+  ContextType operator()() { return ctx_; }
+
  private:
   /*! \brief internal context type. */
   ContextType ctx_;