A function call. More...
#include <IR.h>
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. | |
| 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. | |
| 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. | |
| static Expr | make (const Buffer<> &image, const std::vector< Expr > &args) |
| Convenience constructor for loads from concrete images. | |
| static Expr | make (const Parameter ¶m, const std::vector< Expr > &args) |
| Convenience constructor for loads from images parameters. | |
| 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. | |
| static const Call * | as_tag (const Expr &e) |
Public Attributes | |
| 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. | |
| IRNodeType | node_type |
| Each IR node subclass has a unique identifier. | |
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.
| typedef const char* const Halide::Internal::Call::ConstString |
| 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 |
References HALIDE_EXPORT.
Referenced by is_intrinsic().
|
static |
References args, call_type, func, image, param, Halide::Internal::Type, Halide::Internal::BaseExprNode::type, and value_index.
|
static |
References args, call_type, func, image, name, param, Halide::Internal::Type, Halide::Internal::BaseExprNode::type, and value_index.
|
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 708 of file IR.h.
References call_type, Image, PureExtern, and PureIntrinsic.
|
inline |
Definition at line 714 of file IR.h.
References call_type, Intrinsic, and PureIntrinsic.
Referenced by is_intrinsic(), is_intrinsic(), is_tag(), Halide::Internal::IRMatcher::Intrin< Args >::match(), and Halide::Internal::IRMatcher::Overflow::match().
|
inline |
Definition at line 719 of file IR.h.
References get_intrinsic_name(), and is_intrinsic().
|
inline |
Definition at line 723 of file IR.h.
References is_intrinsic().
|
inline |
Definition at line 732 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 738 of file IR.h.
References Halide::Internal::IRHandle::as().
Referenced by as_tag().
Definition at line 749 of file IR.h.
References as_intrinsic(), likely, likely_if_innermost, and strict_float.
|
inline |
Definition at line 753 of file IR.h.
References call_type, Extern, ExternCPlusPlus, and PureExtern.
| std::string Halide::Internal::Call::name |
Definition at line 491 of file IR.h.
Referenced by Halide::SimdOpCheckTest::check_one(), and make().
| std::vector<Expr> Halide::Internal::Call::args |
Definition at line 492 of file IR.h.
Referenced by Halide::SimdOpCheckTest::check_one(), make(), make(), make(), make(), make(), and Halide::Internal::IRMatcher::Intrin< Args >::match_args().
| CallType Halide::Internal::Call::call_type |
Definition at line 501 of file IR.h.
Referenced by Halide::SimdOpCheckTest::check_one(), is_extern(), is_intrinsic(), is_pure(), make(), and make().
|
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 |
| int Halide::Internal::Call::value_index |
| Buffer Halide::Internal::Call::image |
| Parameter Halide::Internal::Call::param |
|
static |
Definition at line 759 of file IR.h.
Referenced by Halide::Internal::IRMatcher::Overflow::match().