Halide
|
A function call. More...
#include <IR.h>
Inherits Halide::Internal::ExprNode< Call >.
Public Member Functions | |
bool | is_pure () const |
Check if a call node is pure within a pipeline, meaning that the same args always give the same result, and the calls can be reordered, duplicated, unified, etc without changing the meaning of anything. More... | |
bool | is_intrinsic () const |
bool | is_intrinsic (IntrinsicOp op) const |
bool | is_intrinsic (std::initializer_list< IntrinsicOp > intrinsics) const |
bool | is_tag () const |
bool | is_extern () const |
Public Member Functions inherited from Halide::Internal::ExprNode< Call > | |
void | accept (IRVisitor *v) const override |
We use the visitor pattern to traverse IR nodes throughout the compiler, so we have a virtual accept method which accepts visitors. More... | |
Expr | mutate_expr (IRMutator *v) const override |
ExprNode () | |
~ExprNode () override=default | |
Public Member Functions inherited from Halide::Internal::BaseExprNode | |
BaseExprNode (IRNodeType t) | |
Public Member Functions inherited from Halide::Internal::IRNode | |
IRNode (IRNodeType t) | |
virtual | ~IRNode ()=default |
Static Public Member Functions | |
static const char * | get_intrinsic_name (IntrinsicOp op) |
static Expr | make (Type type, IntrinsicOp op, const std::vector< Expr > &args, CallType call_type, FunctionPtr func=FunctionPtr(), int value_index=0, const Buffer<> &image=Buffer<>(), Parameter param=Parameter()) |
static Expr | make (Type type, const std::string &name, const std::vector< Expr > &args, CallType call_type, FunctionPtr func=FunctionPtr(), int value_index=0, Buffer<> image=Buffer<>(), Parameter param=Parameter()) |
static Expr | make (const Function &func, const std::vector< Expr > &args, int idx=0) |
Convenience constructor for calls to other halide functions. More... | |
static Expr | make (const Buffer<> &image, const std::vector< Expr > &args) |
Convenience constructor for loads from concrete images. More... | |
static Expr | make (const Parameter ¶m, const std::vector< Expr > &args) |
Convenience constructor for loads from images parameters. More... | |
static const Call * | as_intrinsic (const Expr &e, std::initializer_list< IntrinsicOp > intrinsics) |
Returns a pointer to a call node if the expression is a call to one of the requested intrinsics. More... | |
static const Call * | as_tag (const Expr &e) |
Public Attributes | |
const typedef char *const | ConstString |
std::string | name |
std::vector< Expr > | args |
CallType | call_type |
FunctionPtr | func |
int | value_index |
Buffer | image |
Parameter | param |
Public Attributes inherited from Halide::Internal::BaseExprNode | |
Type | type |
Public Attributes inherited from Halide::Internal::IRNode | |
RefCount | ref_count |
These classes are all managed with intrusive reference counting, so we also track a reference count. More... | |
IRNodeType | node_type |
Each IR node subclass has a unique identifier. More... | |
A function call.
This can represent a call to some extern function (like sin), but it's also our multi-dimensional version of a Load, so it can be a load from an input image, or a call to another halide function. These two types of call nodes don't survive all the way down to code generation - the lowering process converts them to Load nodes.
Enumerator | |
---|---|
Image | A load from an input image. |
Extern | A call to an external C-ABI function, possibly with side-effects. |
ExternCPlusPlus | A call to an external C-ABI function, possibly with side-effects. |
PureExtern | A call to a guaranteed-side-effect-free external function. |
Halide | A call to a Func. |
Intrinsic | A possibly-side-effecty compiler intrinsic, which has special handling during codegen. |
PureIntrinsic | A side-effect-free version of the above. |
|
static |
Referenced by is_intrinsic().
|
static |
Referenced by make().
|
static |
|
static |
Convenience constructor for calls to other halide functions.
|
inlinestatic |
Convenience constructor for loads from concrete images.
Definition at line 669 of file IR.h.
References args, Image, image, make(), Halide::Buffer< T, Dims >::name(), and Halide::Buffer< T, Dims >::type().
|
inlinestatic |
Convenience constructor for loads from images parameters.
Definition at line 674 of file IR.h.
References args, Image, make(), Halide::Internal::Parameter::name(), param, and Halide::Internal::Parameter::type().
|
inline |
Check if a call node is pure within a pipeline, meaning that the same args always give the same result, and the calls can be reordered, duplicated, unified, etc without changing the meaning of anything.
Not transitive - doesn't guarantee the args themselves are pure. An example of a pure Call node is sqrt. If in doubt, don't mark a Call node as pure.
Definition at line 684 of file IR.h.
References call_type, Image, PureExtern, and PureIntrinsic.
|
inline |
Definition at line 690 of file IR.h.
References call_type, Intrinsic, and PureIntrinsic.
Referenced by is_intrinsic(), is_tag(), Halide::Internal::IRMatcher::Intrin< Args >::match(), and Halide::Internal::IRMatcher::Overflow::match().
|
inline |
Definition at line 695 of file IR.h.
References get_intrinsic_name(), and is_intrinsic().
|
inline |
Definition at line 699 of file IR.h.
References is_intrinsic().
|
inline |
Definition at line 708 of file IR.h.
References is_intrinsic(), likely, likely_if_innermost, and strict_float.
|
inlinestatic |
Returns a pointer to a call node if the expression is a call to one of the requested intrinsics.
Definition at line 714 of file IR.h.
References Halide::Internal::IRHandle::as().
Referenced by as_tag().
Definition at line 725 of file IR.h.
References as_intrinsic(), likely, likely_if_innermost, and strict_float.
|
inline |
Definition at line 729 of file IR.h.
References call_type, Extern, ExternCPlusPlus, and PureExtern.
std::vector<Expr> Halide::Internal::Call::args |
CallType Halide::Internal::Call::call_type |
Definition at line 493 of file IR.h.
Referenced by Halide::SimdOpCheckTest::check_one(), is_extern(), is_intrinsic(), and is_pure().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
FunctionPtr Halide::Internal::Call::func |
Definition at line 643 of file IR.h.
Referenced by Halide::SimdOpCheckTest::check_one().
|
static |
Definition at line 735 of file IR.h.
Referenced by Halide::Internal::IRMatcher::Overflow::match().