|
tvm
|
A registered memory space, independent of backend allocation policy. More...
#include <memory_scope.h>
Public Member Functions | |
| MemoryScope () | |
| Default to the global memory space. | |
| MemoryScope (const ffi::String &name) | |
| Look up a registered name; never implicitly register it. | |
| const ffi::String & | name () const |
| Return the canonical spelling. | |
| bool | operator== (const MemoryScope &other) const |
| bool | operator!= (const MemoryScope &other) const |
| TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE (MemoryScope, ffi::Enum, MemoryScopeObj) | |
Static Public Member Functions | |
| static bool | IsDefined (const ffi::String &name) |
| Test whether a name is registered, without initializing memory scopes. | |
| static TVM_RUNTIME_DLL MemoryScope | Get (const ffi::String &name) |
| Look up a registered name. Unknown names raise ValueError. | |
| static MemoryScope | Register (const ffi::String &name) |
| Register a new name. Duplicate names raise ValueError. | |
| static TVM_RUNTIME_DLL const MemoryScope & | Global () |
| Return the canonical global singleton. | |
A registered memory space, independent of backend allocation policy.
Register extensions with ffi::reflection::EnumDef<MemoryScopeObj>("my.scope"). Registration order has no semantic meaning. A backend must explicitly support a scope before it can allocate storage in that space.
|
inline |
Default to the global memory space.
|
inlineexplicit |
Look up a registered name; never implicitly register it.
|
static |
Look up a registered name. Unknown names raise ValueError.
|
static |
Return the canonical global singleton.
|
inlinestatic |
Test whether a name is registered, without initializing memory scopes.
|
inline |
Return the canonical spelling.
|
inline |
|
inline |
|
inlinestatic |
Register a new name. Duplicate names raise ValueError.
| tvm::runtime::MemoryScope::TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE | ( | MemoryScope | , |
| ffi::Enum | , | ||
| MemoryScopeObj | |||
| ) |