RAII wrapper function to enter and exit a context object similar to python's with syntax.
More...
#include <with_context.h>
template<typename ContextType>
class tvm::With< ContextType >
RAII wrapper function to enter and exit a context object similar to python's with syntax.
class MyContext {
private:
friend class With<MyContext>;
MyContext(arguments);
void EnterWithScope();
void ExitWithScope();
};
{
}
RAII wrapper function to enter and exit a context object similar to python's with syntax.
Definition with_context.h:59
- Template Parameters
-
| ContextType | Type of the context object. |
◆ With() [1/3]
template<typename ContextType >
template<typename... Args>
| tvm::With< ContextType >::With |
( |
Args &&... |
args | ) |
|
|
inlineexplicit |
constructor. Enter the scope of the context.
◆ ~With()
template<typename ContextType >
destructor, leaves the scope of the context.
◆ With() [2/3]
template<typename ContextType >
| tvm::With< ContextType >::With |
( |
const With< ContextType > & |
other | ) |
|
|
delete |
◆ With() [3/3]
template<typename ContextType >
◆ get() [1/2]
template<typename ContextType >
| ContextType * tvm::With< ContextType >::get |
( |
| ) |
|
|
inline |
◆ get() [2/2]
template<typename ContextType >
| const ContextType * tvm::With< ContextType >::get |
( |
| ) |
const |
|
inline |
◆ operator()()
template<typename ContextType >
| ContextType tvm::With< ContextType >::operator() |
( |
| ) |
|
|
inline |
◆ operator*() [1/2]
template<typename ContextType >
| ContextType & tvm::With< ContextType >::operator* |
( |
| ) |
|
|
inline |
◆ operator*() [2/2]
template<typename ContextType >
| const ContextType * tvm::With< ContextType >::operator* |
( |
| ) |
const |
|
inline |
◆ operator->() [1/2]
template<typename ContextType >
| ContextType * tvm::With< ContextType >::operator-> |
( |
| ) |
|
|
inline |
◆ operator->() [2/2]
template<typename ContextType >
| const ContextType * tvm::With< ContextType >::operator-> |
( |
| ) |
const |
|
inline |
◆ operator=() [1/2]
template<typename ContextType >
◆ operator=() [2/2]
template<typename ContextType >
The documentation for this class was generated from the following file: