23#ifndef TVM_IR_PRIM_VECTOR_EXPR_H_
24#define TVM_IR_PRIM_VECTOR_EXPR_H_
26#include <tvm/ffi/container/array.h>
55 namespace refl = tvm::ffi::reflection;
56 refl::ObjectDef<RampNode>()
71 explicit Ramp(ffi::ObjectPtr<RampNode> node) :
PrimExpr(std::move(node)) {}
90 namespace refl = tvm::ffi::reflection;
91 refl::ObjectDef<BroadcastNode>()
124 namespace refl = tvm::ffi::reflection;
125 refl::ObjectDef<ShuffleNode>()
Base type of all the expressions.
Definition base_expr.h:324
Non-nullable source-location metadata.
Definition location.h:91
Typed reference/view over any Expr whose ExprNode::ty is PrimType.
Definition base_expr.h:447
Reference to the shared immutable unknown location.
Definition location.h:105
Create a vector where all the elements are value.
Definition vector_expr.h:79
static void RegisterReflection()
Definition vector_expr.h:89
BroadcastNode(ffi::UnsafeInit tag)
Definition vector_expr.h:83
BroadcastNode(PrimExpr value, PrimExpr lanes)
Definition vector_expr.h:81
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("prim.Broadcast", BroadcastNode, ExprNode)
PrimExpr value
The base value.
Definition vector_expr.h:86
PrimExpr lanes
The number of lanes.
Definition vector_expr.h:88
Managed reference to BroadcastNode.
Definition vector_expr.h:102
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(Broadcast, PrimExpr, BroadcastNode)
Broadcast(ffi::ObjectPtr< BroadcastNode > node)
Definition vector_expr.h:105
TVM_TIRX_DLL Broadcast(PrimExpr value, PrimExpr lanes, Location loc=UnknownLoc())
TVM_DEFINE_OBJECT_REF_COW_METHOD(BroadcastNode)
static constexpr bool _type_container_is_exact
Definition vector_expr.h:108
Construct a vector with lanes elements where its i-th element equals base + i * stride....
Definition vector_expr.h:42
RampNode(PrimExpr base, PrimExpr stride, PrimExpr lanes)
Definition vector_expr.h:44
PrimExpr lanes
Total number of lanes.
Definition vector_expr.h:53
PrimExpr stride
The stride of each step.
Definition vector_expr.h:51
PrimExpr base
The base value.
Definition vector_expr.h:49
static void RegisterReflection()
Definition vector_expr.h:54
RampNode(ffi::UnsafeInit tag)
Definition vector_expr.h:46
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("prim.Ramp", RampNode, ExprNode)
Managed reference to RampNode.
Definition vector_expr.h:68
Ramp(ffi::ObjectPtr< RampNode > node)
Definition vector_expr.h:71
TVM_TIRX_DLL Ramp(PrimExpr base, PrimExpr stride, PrimExpr lanes, Location loc=UnknownLoc())
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(Ramp, PrimExpr, RampNode)
static constexpr bool _type_container_is_exact
Definition vector_expr.h:74
TVM_DEFINE_OBJECT_REF_COW_METHOD(RampNode)
Shuffle instruction. vec = concat(vectors) result = (vec[indices[0]], vec[indices[1]] ....
Definition vector_expr.h:117
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("prim.Shuffle", ShuffleNode, ExprNode)
ffi::Array< PrimExpr > vectors
the input vectors.
Definition vector_expr.h:120
static void RegisterReflection()
Definition vector_expr.h:123
ffi::Array< PrimExpr > indices
The indices of each element.
Definition vector_expr.h:122
Managed reference to ShuffleNode.
Definition vector_expr.h:136
TVM_TIRX_DLL Shuffle(ffi::Array< PrimExpr > vectors, ffi::Array< PrimExpr > indices, Location loc=UnknownLoc())
static TVM_TIRX_DLL PrimExpr Concat(ffi::Array< PrimExpr > vectors, Location loc=UnknownLoc())
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(Shuffle, PrimExpr, ShuffleNode)
static constexpr bool _type_container_is_exact
Definition vector_expr.h:146
static TVM_TIRX_DLL PrimExpr ExtractElement(PrimExpr vector, int index, Location loc=UnknownLoc())
Shuffle(ffi::ObjectPtr< ShuffleNode > node)
Definition vector_expr.h:143
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 attr.h:23
#define TVM_TIRX_DLL
Definition base.h:83