Class MemoryScope#
Defined in File memory_scope.h
Inheritance Relationships#
Base Type#
public ffi::Enum
Class Documentation#
-
class MemoryScope : public ffi::Enum#
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.
Public Types
-
using ContainerType = MemoryScopeObj#
Public Functions
-
inline MemoryScope()#
Default to the global memory space.
-
inline explicit MemoryScope(const ffi::String &name)#
Look up a registered name; never implicitly register it.
-
inline bool operator==(const MemoryScope &other) const#
-
inline bool operator!=(const MemoryScope &other) const#
-
inline explicit MemoryScope(::tvm::ffi::UnsafeInit tag)#
-
inline __PtrType operator->() const#
-
inline __PtrType get() const#
Public Static Functions
-
static inline bool IsDefined(const ffi::String &name)#
Test whether a name is registered, without initializing memory scopes.
-
static MemoryScope Get(const ffi::String &name)#
Look up a registered name. Unknown names raise ValueError.
-
static inline MemoryScope Register(const ffi::String &name)#
Register a new name. Duplicate names raise ValueError.
-
static const MemoryScope &Global()#
Return the canonical global singleton.
-
using ContainerType = MemoryScopeObj#