Class LiteralDoc#

Inheritance Relationships#

Base Type#

Class Documentation#

class LiteralDoc : public tvm::script::printer::ExprDoc#

Reference type of LiteralDocObj.

See also

LiteralDocObj

Public Types

using ContainerType = LiteralDocObj#

Public Functions

inline explicit LiteralDoc(::tvm::ffi::UnsafeInit tag)#
inline __PtrType operator->() const#
inline __PtrType get() const#

Public Static Functions

static inline LiteralDoc None(const ffi::Optional<AccessPath> &p)#

Create a LiteralDoc to represent None/null/empty value.

Parameters:

p – The object path

static inline LiteralDoc Int(int64_t v, const ffi::Optional<AccessPath> &p)#

Create a LiteralDoc to represent integer.

Parameters:
  • v – The integer value.

  • p – The object path

static inline LiteralDoc Int(IntImm v, const ffi::Optional<AccessPath> &p)#

Create an integer literal preserving its typed payload.

Parameters:
  • v – The typed integer value.

  • p – The object path.

Returns:

The integer literal.

static inline LiteralDoc Boolean(bool v, const ffi::Optional<AccessPath> &p)#

Create a LiteralDoc to represent boolean.

Parameters:
  • v – The boolean value.

  • p – The object path

static inline LiteralDoc Float(double v, const ffi::Optional<AccessPath> &p)#

Create a LiteralDoc to represent float.

Parameters:
  • v – The float value.

  • p – The object path

static inline LiteralDoc Str(const ffi::String &v, const ffi::Optional<AccessPath> &p)#

Create a LiteralDoc to represent string.

Parameters:
  • v – The string value.

  • p – The object path

static inline LiteralDoc DataType(DLDataType v, const ffi::Optional<AccessPath> &p)#

Create a LiteralDoc to represent string.

Parameters:
  • v – The string value.

  • p – The object path

static inline LiteralDoc Device(const DLDevice &v, const ffi::Optional<AccessPath> &p)#

Create a LiteralDoc to represent device.

Parameters:
  • v – The device.

  • p – The object path

Protected Functions

explicit LiteralDoc(ffi::Any value, const ffi::Optional<AccessPath> &object_path)#