Class PrimVar#

Inheritance Relationships#

Base Type#

Class Documentation#

class PrimVar : public tvm::PrimExpr#

Checked scalar view over a VarObj.

PrimVar is a zero-state reference view over the same VarObj as Var. It additionally guarantees that the inherited ExprObj::ty is PrimType.

Public Types

using ContainerType = VarObj#

Public Functions

inline explicit PrimVar(ffi::String name, PrimType dtype = PrimType::Int(32), Location loc = UnknownLoc())#

Construct a scalar variable directly from a primitive type.

inline explicit PrimVar(ffi::String name, Type type_annotation, Location loc = UnknownLoc())#

Construct a scalar variable directly from a checked type annotation.

inline operator Var() const#

Safe widening to a general Var view over the same node.

inline PrimVar CopyWithSuffix(const ffi::String &suffix) const#
inline PrimVar CopyWithDType(PrimType dtype) const#
inline explicit PrimVar(ffi::ObjectPtr<VarObj> node)#
inline explicit PrimVar(::tvm::ffi::UnsafeInit tag)#
inline __PtrType operator->() const#
inline __PtrType get() const#