tvm
Public Member Functions | List of all members
tvm::tirx::AllocBuffer Class Reference

Managed reference to AllocBufferNode. More...

#include <stmt.h>

Inheritance diagram for tvm::tirx::AllocBuffer:
Collaboration diagram for tvm::tirx::AllocBuffer:

Public Member Functions

 AllocBuffer (Buffer buffer, ffi::Map< ffi::String, ffi::Any > annotations=ffi::Map< ffi::String, ffi::Any >(), Span span=Span())
 
std::optional< int64_t > ConstantAllocationSize () const
 If the buffer's shape is constant, return the total number of elements. More...
 
 TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE (AllocBuffer, Stmt, AllocBufferNode)
 
 TVM_DEFINE_OBJECT_REF_COW_METHOD (AllocBufferNode)
 
- Public Member Functions inherited from tvm::tirx::Stmt
 TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE (Stmt, ObjectRef, StmtNode)
 

Detailed Description

Managed reference to AllocBufferNode.

Constructor & Destructor Documentation

◆ AllocBuffer()

tvm::tirx::AllocBuffer::AllocBuffer ( Buffer  buffer,
ffi::Map< ffi::String, ffi::Any >  annotations = ffi::Map< ffi::String, ffi::Any >(),
Span  span = Span() 
)

Member Function Documentation

◆ ConstantAllocationSize()

std::optional<int64_t> tvm::tirx::AllocBuffer::ConstantAllocationSize ( ) const
inline

If the buffer's shape is constant, return the total number of elements.

Returns
The product of all shape extents if all are constant, std::nullopt otherwise.

◆ TVM_DEFINE_OBJECT_REF_COW_METHOD()

tvm::tirx::AllocBuffer::TVM_DEFINE_OBJECT_REF_COW_METHOD ( AllocBufferNode  )

◆ TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE()

tvm::tirx::AllocBuffer::TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE ( AllocBuffer  ,
Stmt  ,
AllocBufferNode   
)

The documentation for this class was generated from the following file: