23#ifndef TVM_IR_PRIM_VECTOR_EXPR_H_
24#define TVM_IR_PRIM_VECTOR_EXPR_H_
26#include <tvm/ffi/container/array.h>
58 namespace refl = tvm::ffi::reflection;
59 refl::ObjectDef<RampObj>()
74 explicit Ramp(ffi::ObjectPtr<RampObj> node) :
PrimExpr(std::move(node)) {}
92 namespace refl = tvm::ffi::reflection;
93 refl::ObjectDef<BroadcastObj>()
126 namespace refl = tvm::ffi::reflection;
127 refl::ObjectDef<ShuffleObj>()
#define TVM_TIRX_DLL
Definition base.h:55
Base type of all the expressions.
Definition expr.h:66
Non-nullable source-location metadata.
Definition location.h:91
Typed reference/view over any Expr whose ExprObj::ty is PrimType.
Definition expr.h:187
Reference to the shared immutable unknown location.
Definition location.h:105
Create a vector where all the elements are value.
Definition vector_expr.h:82
PrimExpr lanes
The number of lanes.
Definition vector_expr.h:90
static void RegisterReflection()
Definition vector_expr.h:91
BroadcastObj(PrimExpr value, PrimExpr lanes)
Definition vector_expr.h:84
BroadcastObj(ffi::UnsafeInit tag)
Definition vector_expr.h:85
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("prim.Broadcast", BroadcastObj, ExprObj)
PrimExpr value
The base value.
Definition vector_expr.h:88
Managed reference to BroadcastObj.
Definition vector_expr.h:104
TVM_DEFINE_OBJECT_REF_COW_METHOD(BroadcastObj)
Broadcast(ffi::ObjectPtr< BroadcastObj > node)
Definition vector_expr.h:107
TVM_TIRX_DLL Broadcast(PrimExpr value, PrimExpr lanes, Location loc=UnknownLoc())
static constexpr bool _type_container_is_exact
Definition vector_expr.h:110
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(Broadcast, PrimExpr, BroadcastObj)
Construct a vector with lanes elements where its i-th element equals base + i * stride....
Definition vector_expr.h:45
static void RegisterReflection()
Definition vector_expr.h:57
RampObj(ffi::UnsafeInit tag)
Definition vector_expr.h:49
RampObj(PrimExpr base, PrimExpr stride, PrimExpr lanes)
Definition vector_expr.h:47
PrimExpr base
The base value.
Definition vector_expr.h:52
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("prim.Ramp", RampObj, ExprObj)
PrimExpr lanes
Total number of lanes.
Definition vector_expr.h:56
PrimExpr stride
The stride of each step.
Definition vector_expr.h:54
Managed reference to RampObj.
Definition vector_expr.h:71
Ramp(ffi::ObjectPtr< RampObj > node)
Definition vector_expr.h:74
TVM_TIRX_DLL Ramp(PrimExpr base, PrimExpr stride, PrimExpr lanes, Location loc=UnknownLoc())
TVM_DEFINE_OBJECT_REF_COW_METHOD(RampObj)
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(Ramp, PrimExpr, RampObj)
static constexpr bool _type_container_is_exact
Definition vector_expr.h:77
Shuffle instruction. vec = concat(vectors) result = (vec[indices[0]], vec[indices[1]] ....
Definition vector_expr.h:119
static void RegisterReflection()
Definition vector_expr.h:125
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("prim.Shuffle", ShuffleObj, ExprObj)
ffi::Array< PrimExpr > vectors
the input vectors.
Definition vector_expr.h:122
ffi::Array< PrimExpr > indices
The indices of each element.
Definition vector_expr.h:124
Managed reference to ShuffleObj.
Definition vector_expr.h:138
TVM_FFI_DEFINE_OBJECT_REF_METHODS_NOTNULLABLE(Shuffle, PrimExpr, ShuffleObj)
Shuffle(ffi::ObjectPtr< ShuffleObj > node)
Definition vector_expr.h:145
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())
static constexpr bool _type_container_is_exact
Definition vector_expr.h:148
static TVM_TIRX_DLL PrimExpr ExtractElement(PrimExpr vector, int index, Location loc=UnknownLoc())
TVM_DEFINE_OBJECT_REF_COW_METHOD(ShuffleObj)
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 analysis.h:41