23#ifndef TVM_IR_PRIM_VECTOR_EXPR_H_
24#define TVM_IR_PRIM_VECTOR_EXPR_H_
26#include <tvm/ffi/container/array.h>
51 namespace refl = tvm::ffi::reflection;
52 refl::ObjectDef<RampNode>()
80 namespace refl = tvm::ffi::reflection;
81 refl::ObjectDef<BroadcastNode>()
112 namespace refl = tvm::ffi::reflection;
113 refl::ObjectDef<ShuffleNode>()
Base type of all the expressions.
Definition base_expr.h:300
Typed reference/view over any Expr whose ExprNode::ty is PrimType.
Definition base_expr.h:401
Definition source_map.h:111
RAII wrapper function to enter and exit a context object similar to python's with syntax.
Definition with_context.h:59
Create a vector where all the elements are value.
Definition vector_expr.h:73
static void RegisterReflection()
Definition vector_expr.h:79
PrimExpr value
The base value.
Definition vector_expr.h:76
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("ir.prim.Broadcast", BroadcastNode, ExprNode)
PrimExpr lanes
The number of lanes.
Definition vector_expr.h:78
Managed reference to BroadcastNode.
Definition vector_expr.h:92
Broadcast(PrimExpr value, PrimExpr lanes, Span span=Span())
TVM_DEFINE_OBJECT_REF_COW_METHOD(BroadcastNode)
static constexpr bool _type_container_is_exact
Definition vector_expr.h:96
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(Broadcast, PrimExpr, BroadcastNode)
Construct a vector with lanes elements where its i-th element equals base + i * stride....
Definition vector_expr.h:42
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("ir.prim.Ramp", RampNode, ExprNode)
PrimExpr lanes
Total number of lanes.
Definition vector_expr.h:49
PrimExpr stride
The stride of each step.
Definition vector_expr.h:47
PrimExpr base
The base value.
Definition vector_expr.h:45
static void RegisterReflection()
Definition vector_expr.h:50
Managed reference to RampNode.
Definition vector_expr.h:64
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(Ramp, PrimExpr, RampNode)
Ramp(PrimExpr base, PrimExpr stride, PrimExpr lanes, Span span=Span())
static constexpr bool _type_container_is_exact
Definition vector_expr.h:68
TVM_DEFINE_OBJECT_REF_COW_METHOD(RampNode)
Shuffle instruction. vec = concat(vectors) result = (vec[indices[0]], vec[indices[1]] ....
Definition vector_expr.h:105
ffi::Array< PrimExpr > vectors
the input vectors.
Definition vector_expr.h:108
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("ir.prim.Shuffle", ShuffleNode, ExprNode)
static void RegisterReflection()
Definition vector_expr.h:111
ffi::Array< PrimExpr > indices
The indices of each element.
Definition vector_expr.h:110
Managed reference to ShuffleNode.
Definition vector_expr.h:124
static PrimExpr ExtractElement(PrimExpr vector, int index, Span span=Span())
static constexpr bool _type_container_is_exact
Definition vector_expr.h:130
Shuffle(ffi::Array< PrimExpr > vectors, ffi::Array< PrimExpr > indices, Span span=Span())
static PrimExpr Concat(ffi::Array< PrimExpr > vectors, Span span=Span())
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NULLABLE(Shuffle, PrimExpr, ShuffleNode)
TVM_DEFINE_OBJECT_REF_COW_METHOD(ShuffleNode)
Copy-on-write helper macro for IR ffi::ObjectRef types.
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition analyzer.h:40