Loading...
Searching...
No Matches
IR.h
Go to the documentation of this file.
#ifndef HALIDE_IR_H
#define HALIDE_IR_H
/** \file
* Subtypes for Halide expressions (\ref Halide::Expr) and statements (\ref Halide::Internal::Stmt)
*/
#include <string>
#include <vector>
#include "Buffer.h"
#include "Expr.h"
#include "FunctionPtr.h"
#include "LoopPartitioningDirective.h"
#include "ModulusRemainder.h"
#include "Parameter.h"
#include "PrefetchDirective.h"
#include "Reduction.h"
#include "Type.h"
namespace Halide {
namespace Internal {
class Function;
/** The actual IR nodes begin here. Remember that all the Expr
* nodes also have a public "type" property */
/** Cast a node from one type to another. Can't change vector widths. */
struct Cast : public ExprNode<Cast> {
Expr value;
static Expr make(Type t, Expr v);
static const IRNodeType _node_type = IRNodeType::Cast;
/** Check if the cast is equivalent to a reinterpret. */
bool is_reinterpret() const {
return (type.is_int_or_uint() &&
value.type().is_int_or_uint() &&
type.bits() == value.type().bits());
}
};
/** Reinterpret value as another type, without affecting any of the bits
* (on little-endian systems). */
struct Reinterpret : public ExprNode<Reinterpret> {
Expr value;
static Expr make(Type t, Expr v);
static const IRNodeType _node_type = IRNodeType::Reinterpret;
};
/** The sum of two expressions */
struct Add : public ExprNode<Add> {
Expr a, b;
static Expr make(Expr a, Expr b);
static const IRNodeType _node_type = IRNodeType::Add;
};
/** The difference of two expressions */
struct Sub : public ExprNode<Sub> {
Expr a, b;
static Expr make(Expr a, Expr b);
static const IRNodeType _node_type = IRNodeType::Sub;
};
/** The product of two expressions */
struct Mul : public ExprNode<Mul> {
Expr a, b;
static Expr make(Expr a, Expr b);
static const IRNodeType _node_type = IRNodeType::Mul;
};
/** The ratio of two expressions */
struct Div : public ExprNode<Div> {
Expr a, b;
static Expr make(Expr a, Expr b);
static const IRNodeType _node_type = IRNodeType::Div;
};
/** The remainder of a / b. Mostly equivalent to '%' in C, except that
* the result here is always positive. For floats, this is equivalent
* to calling fmod. */
struct Mod : public ExprNode<Mod> {
Expr a, b;
static Expr make(Expr a, Expr b);
static const IRNodeType _node_type = IRNodeType::Mod;
};
/** The lesser of two values. */
struct Min : public ExprNode<Min> {
Expr a, b;
static Expr make(Expr a, Expr b);
static const IRNodeType _node_type = IRNodeType::Min;
};
/** The greater of two values */
struct Max : public ExprNode<Max> {
Expr a, b;
static Expr make(Expr a, Expr b);
static const IRNodeType _node_type = IRNodeType::Max;
};
/** Is the first expression equal to the second */
struct EQ : public ExprNode<EQ> {
Expr a, b;
static Expr make(Expr a, Expr b);
static const IRNodeType _node_type = IRNodeType::EQ;
};
/** Is the first expression not equal to the second */
struct NE : public ExprNode<NE> {
Expr a, b;
static Expr make(Expr a, Expr b);
static const IRNodeType _node_type = IRNodeType::NE;
};
/** Is the first expression less than the second. */
struct LT : public ExprNode<LT> {
Expr a, b;
static Expr make(Expr a, Expr b);
static const IRNodeType _node_type = IRNodeType::LT;
};
/** Is the first expression less than or equal to the second. */
struct LE : public ExprNode<LE> {
Expr a, b;
static Expr make(Expr a, Expr b);
static const IRNodeType _node_type = IRNodeType::LE;
};
/** Is the first expression greater than the second. */
struct GT : public ExprNode<GT> {
Expr a, b;
static Expr make(Expr a, Expr b);
static const IRNodeType _node_type = IRNodeType::GT;
};
/** Is the first expression greater than or equal to the second. */
struct GE : public ExprNode<GE> {
Expr a, b;
static Expr make(Expr a, Expr b);
static const IRNodeType _node_type = IRNodeType::GE;
};
/** Logical and - are both expressions true */
struct And : public ExprNode<And> {
Expr a, b;
static Expr make(Expr a, Expr b);
static const IRNodeType _node_type = IRNodeType::And;
};
/** Logical or - is at least one of the expression true */
struct Or : public ExprNode<Or> {
Expr a, b;
static Expr make(Expr a, Expr b);
static const IRNodeType _node_type = IRNodeType::Or;
};
/** Logical not - true if the expression false */
struct Not : public ExprNode<Not> {
Expr a;
static Expr make(Expr a);
static const IRNodeType _node_type = IRNodeType::Not;
};
/** A ternary operator. Evalutes 'true_value' and 'false_value',
* then selects between them based on 'condition'. Equivalent to
* the ternary operator in C. */
struct Select : public ExprNode<Select> {
Expr condition, true_value, false_value;
static Expr make(Expr condition, Expr true_value, Expr false_value);
static const IRNodeType _node_type = IRNodeType::Select;
};
/** Load a value from a named symbol if predicate is true. The buffer
* is treated as an array of the 'type' of this Load node. That is,
* the buffer has no inherent type. The name may be the name of an
* enclosing allocation, an input or output buffer, or any other
* symbol of type Handle(). */
struct Load : public ExprNode<Load> {
std::string name;
Expr predicate, index;
// If it's a load from an image argument or compiled-in constant
// image, this will point to that
Buffer<> image;
// If it's a load from an image parameter, this points to that
Parameter param;
// The alignment of the index. If the index is a vector, this is
// the alignment of the first lane.
ModulusRemainder alignment;
static Expr make(Type type, const std::string &name,
Expr index, Buffer<> image,
Parameter param,
Expr predicate,
ModulusRemainder alignment);
static const IRNodeType _node_type = IRNodeType::Load;
};
/** A linear ramp vector node. This is vector with 'lanes' elements,
* where element i is 'base' + i*'stride'. This is a convenient way to
* pass around vectors without busting them up into individual
* elements. E.g. a dense vector load from a buffer can use a ramp
* node with stride 1 as the index. */
struct Ramp : public ExprNode<Ramp> {
Expr base, stride;
int lanes;
static Expr make(Expr base, Expr stride, int lanes);
static const IRNodeType _node_type = IRNodeType::Ramp;
};
/** A vector with 'lanes' elements, in which every element is
* 'value'. This is a special case of the ramp node above, in which
* the stride is zero. */
struct Broadcast : public ExprNode<Broadcast> {
Expr value;
int lanes;
static Expr make(Expr value, int lanes);
static const IRNodeType _node_type = IRNodeType::Broadcast;
};
/** A let expression, like you might find in a functional
* language. Within the expression \ref Let::body, instances of the Var
* node \ref Let::name refer to \ref Let::value. */
struct Let : public ExprNode<Let> {
std::string name;
Expr value, body;
static Expr make(const std::string &name, Expr value, Expr body);
static const IRNodeType _node_type = IRNodeType::Let;
};
/** The statement form of a let node. Within the statement 'body',
* instances of the Var named 'name' refer to 'value' */
struct LetStmt : public StmtNode<LetStmt> {
std::string name;
Expr value;
Stmt body;
static Stmt make(const std::string &name, Expr value, Stmt body);
static const IRNodeType _node_type = IRNodeType::LetStmt;
};
/** If the 'condition' is false, then evaluate and return the message,
* which should be a call to an error function. */
struct AssertStmt : public StmtNode<AssertStmt> {
// if condition then val else error out with message
Expr condition;
Expr message;
static Stmt make(Expr condition, Expr message);
static const IRNodeType _node_type = IRNodeType::AssertStmt;
};
/** This node is a helpful annotation to do with permissions. If 'is_produce' is
* set to true, this represents a producer node which may also contain updates;
* otherwise, this represents a consumer node. If the producer node contains
* updates, the body of the node will be a block of 'produce' and 'update'
* in that order. In a producer node, the access is read-write only (or write
* only if it doesn't have updates). In a consumer node, the access is read-only.
* None of this is actually enforced, the node is purely for informative purposes
* to help out our analysis during lowering. For every unique ProducerConsumer,
* there is an associated Realize node with the same name that creates the buffer
* being read from or written to in the body of the ProducerConsumer.
*/
struct ProducerConsumer : public StmtNode<ProducerConsumer> {
std::string name;
bool is_producer;
Stmt body;
static Stmt make(const std::string &name, bool is_producer, Stmt body);
static Stmt make_produce(const std::string &name, Stmt body);
static Stmt make_consume(const std::string &name, Stmt body);
static const IRNodeType _node_type = IRNodeType::ProducerConsumer;
};
/** Store a 'value' to the buffer called 'name' at a given 'index' if
* 'predicate' is true. The buffer is interpreted as an array of the
* same type as 'value'. The name may be the name of an enclosing
* Allocate node, an output buffer, or any other symbol of type
* Handle(). */
struct Store : public StmtNode<Store> {
std::string name;
Expr predicate, value, index;
// If it's a store to an output buffer, then this parameter points to it.
Parameter param;
// The alignment of the index. If the index is a vector, this is
// the alignment of the first lane.
ModulusRemainder alignment;
static Stmt make(const std::string &name, Expr value, Expr index,
Parameter param, Expr predicate, ModulusRemainder alignment);
static const IRNodeType _node_type = IRNodeType::Store;
};
/** This defines the value of a function at a multi-dimensional
* location. You should think of it as a store to a multi-dimensional
* array. It gets lowered to a conventional Store node. The name must
* correspond to an output buffer or the name of an enclosing Realize
* node. */
struct Provide : public StmtNode<Provide> {
std::string name;
std::vector<Expr> values;
std::vector<Expr> args;
Expr predicate;
static Stmt make(const std::string &name, const std::vector<Expr> &values, const std::vector<Expr> &args, const Expr &predicate);
static const IRNodeType _node_type = IRNodeType::Provide;
};
/** Allocate a scratch area called with the given name, type, and
* size. The buffer lives for at most the duration of the body
* statement, within which it may or may not be freed explicitly with
* a Free node with a matching name. Allocation only occurs if the
* condition evaluates to true. Within the body of the allocation,
* defines a symbol with the given name and the type Handle(). */
struct Allocate : public StmtNode<Allocate> {
std::string name;
Type type;
MemoryType memory_type;
std::vector<Expr> extents;
// A boolean condition that determines if the allocation needs to be made at all.
Expr condition;
// These override the code generator dependent malloc and free
// equivalents if provided. If the new_expr succeeds, that is it
// returns non-nullptr, the function named be free_function is
// guaranteed to be called. The free function signature must match
// that of the code generator dependent free (typically
// halide_free). If free_function is left empty, code generator
// default will be called.
Expr new_expr;
std::string free_function;
// Extra padding elements to allow for overreads. Elements in the padding
// have undetermined values, but are guaranteed safe to load.
int padding;
Stmt body;
static Stmt make(const std::string &name, Type type, MemoryType memory_type,
const std::vector<Expr> &extents,
Expr condition, Stmt body,
Expr new_expr = Expr(), const std::string &free_function = std::string(), int padding = 0);
/** A routine to check if the extents are all constants, and if so verify
* the total size is less than 2^31 - 1. If the result is constant, but
* overflows, this routine asserts. This returns 0 if the extents are
* not all constants; otherwise, it returns the total constant allocation
* size. Does not include any padding bytes. */
static int32_t constant_allocation_size(const std::vector<Expr> &extents, const std::string &name);
int32_t constant_allocation_size() const;
static const IRNodeType _node_type = IRNodeType::Allocate;
};
/** Free the resources associated with the given buffer. */
struct Free : public StmtNode<Free> {
std::string name;
static Stmt make(const std::string &name);
static const IRNodeType _node_type = IRNodeType::Free;
};
/** Allocate a multi-dimensional buffer of the given type and
* size. Create some scratch memory that will back the function 'name'
* over the range specified in 'bounds'. The bounds are a vector of
* (min, extent) pairs for each dimension. Allocation only occurs if
* the condition evaluates to true.
*/
struct Realize : public StmtNode<Realize> {
std::string name;
std::vector<Type> types;
MemoryType memory_type;
Region bounds;
Expr condition;
Stmt body;
static Stmt make(const std::string &name, const std::vector<Type> &types, MemoryType memory_type, const Region &bounds, Expr condition, Stmt body);
static const IRNodeType _node_type = IRNodeType::Realize;
};
/** A sequence of statements to be executed in-order. 'first' is never
a Block, so this can be treated as a linked list. */
struct Block : public StmtNode<Block> {
Stmt first, rest;
static Stmt make(Stmt first, Stmt rest);
/** Construct zero or more Blocks to invoke a list of statements in order.
* This method may not return a Block statement if stmts.size() <= 1. */
static Stmt make(const std::vector<Stmt> &stmts);
static const IRNodeType _node_type = IRNodeType::Block;
};
/** A pair of statements executed concurrently. Both statements are
* joined before the Stmt ends. This is the parallel equivalent to
* Block. */
struct Fork : public StmtNode<Fork> {
Stmt first, rest;
static Stmt make(Stmt first, Stmt rest);
static const IRNodeType _node_type = IRNodeType::Fork;
};
/** An if-then-else block. 'else' may be undefined. */
struct IfThenElse : public StmtNode<IfThenElse> {
Expr condition;
Stmt then_case, else_case;
static Stmt make(Expr condition, Stmt then_case, Stmt else_case = Stmt());
static const IRNodeType _node_type = IRNodeType::IfThenElse;
};
/** Evaluate and discard an expression, presumably because it has some side-effect. */
struct Evaluate : public StmtNode<Evaluate> {
Expr value;
static Stmt make(Expr v);
static const IRNodeType _node_type = IRNodeType::Evaluate;
};
/** 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. */
struct Call : public ExprNode<Call> {
std::string name;
std::vector<Expr> args;
typedef enum { 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.
} CallType;
CallType call_type;
// Halide uses calls internally to represent certain operations
// (instead of IR nodes). These are matched by name. Note that
// these are deliberately char* (rather than std::string) so that
// they can be referenced at static-initialization time without
// risking ambiguous initalization order; we use a typedef to simplify
// declaration.
typedef const char *const ConstString;
// enums for various well-known intrinsics. (It is not *required* that all
// intrinsics have an enum entry here, but as a matter of style, it is recommended.)
// Note that these are only used in the API; inside the node, they are translated
// into a name. (To recover the name, call get_intrinsic_name().)
//
// Please keep this list sorted alphabetically; the specific enum values
// are *not* guaranteed to be stable across time.
enum IntrinsicOp {
abs,
absd,
add_image_checks_marker,
alloca,
bitwise_and,
bitwise_not,
bitwise_or,
bitwise_xor,
bool_to_mask,
// Bundle multiple exprs together temporarily for analysis (e.g. CSE)
bundle,
call_cached_indirect_function,
cast_mask,
// Concatenate bits of the args, with least significant bits as the
// first arg (i.e. little-endian)
concat_bits,
count_leading_zeros,
count_trailing_zeros,
debug_to_file,
declare_box_touched,
div_round_to_zero,
dynamic_shuffle,
// Extract some contiguous slice of bits from the argument starting at
// the nth bit, counting from the least significant bit, with the number
// of bits determined by the return type.
extract_bits,
extract_mask_element,
get_user_context,
gpu_thread_barrier,
halving_add,
halving_sub,
hvx_gather,
hvx_scatter,
hvx_scatter_acc,
hvx_scatter_release,
if_then_else,
if_then_else_mask,
image_load,
image_store,
lerp,
likely,
likely_if_innermost,
load_typed_struct_member,
make_struct,
memoize_expr,
mod_round_to_zero,
mul_shift_right,
mux,
popcount,
prefetch,
profiling_enable_instance_marker,
promise_clamped,
random,
register_destructor,
require,
require_mask,
return_second,
rewrite_buffer,
// Round a floating point value to nearest integer, with ties going to even
round,
rounding_halving_add,
rounding_mul_shift_right,
rounding_shift_left,
rounding_shift_right,
saturating_add,
saturating_sub,
saturating_cast,
scatter_gather,
select_mask,
shift_left,
shift_right,
signed_integer_overflow,
size_of_halide_buffer_t,
// Marks the point in lowering where the outermost skip stages checks
// should be introduced.
skip_stages_marker,
// Takes a realization name and a loop variable. Declares that values of
// the realization that were stored on earlier loop iterations of the
// given loop are potentially loaded in this loop iteration somewhere
// after this point. Must occur inside a Realize node and For node of
// the given names but outside any corresponding ProducerConsumer
// nodes. Communicates to storage folding that sliding window took
// place.
sliding_window_marker,
// Compute (arg[0] + arg[1]) / 2, assuming arg[0] < arg[1].
sorted_avg,
// strict floating point ops. These are floating point ops that we would
// like to optimize around (or let llvm optimize around) by treating
// them as reals and ignoring the existence of nan and inf. Using these
// intrinsics instead prevents any such optimizations.
strict_add,
strict_div,
strict_eq,
strict_le,
strict_lt,
strict_max,
strict_min,
strict_mul,
strict_sub,
// Convert a list of Exprs to a string
stringify,
// Query properties of the compiled-for target (resolved at compile-time)
target_arch_is,
target_bits,
target_has_feature,
target_natural_vector_size,
target_os_is,
undef,
unreachable,
unsafe_promise_clamped,
// One-sided variants of widening_add, widening_mul, and widening_sub.
// arg[0] + widen(arg[1])
widen_right_add,
// arg[0] * widen(arg[1])
widen_right_mul,
// arg[0] - widen(arg[1])
widen_right_sub,
widening_add,
widening_mul,
widening_shift_left,
widening_shift_right,
widening_sub,
get_runtime_vscale,
IntrinsicOpCount // Sentinel: keep last.
};
static const char *get_intrinsic_name(IntrinsicOp op);
// We also declare some symbolic names for some of the runtime
// functions that we want to construct Call nodes to here to avoid
// magic string constants and the potential risk of typos.
HALIDE_EXPORT static ConstString
buffer_get_dimensions,
buffer_get_min,
buffer_get_extent,
buffer_get_stride,
buffer_get_max,
buffer_get_host,
buffer_get_device,
buffer_get_device_interface,
buffer_get_shape,
buffer_get_host_dirty,
buffer_get_device_dirty,
buffer_get_type,
buffer_set_host_dirty,
buffer_set_device_dirty,
buffer_is_bounds_query,
buffer_init,
buffer_init_from_buffer,
buffer_crop,
buffer_set_bounds,
trace;
// If it's a call to another halide function, this call node holds
// a possibly-weak reference to that function.
FunctionPtr func;
// If that function has multiple values, which value does this
// call node refer to?
int value_index;
// If it's a call to an image, this call nodes hold a
// pointer to that image's buffer
Buffer<> image;
// If it's a call to an image parameter, this call node holds a
// pointer to that
Parameter param;
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());
/** Convenience constructor for calls to other halide functions */
static Expr make(const Function &func, const std::vector<Expr> &args, int idx = 0);
/** Convenience constructor for loads from concrete images */
static Expr make(const Buffer<> &image, const std::vector<Expr> &args) {
return make(image.type(), image.name(), args, Image, FunctionPtr(), 0, image, Parameter());
}
/** Convenience constructor for loads from images parameters */
static Expr make(const Parameter &param, const std::vector<Expr> &args) {
return make(param.type(), param.name(), args, Image, FunctionPtr(), 0, Buffer<>(), param);
}
/** 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. */
bool is_pure() const {
return (call_type == PureExtern ||
call_type == Image ||
call_type == PureIntrinsic);
}
bool is_intrinsic() const {
return (call_type == Intrinsic ||
call_type == PureIntrinsic);
}
bool is_intrinsic(IntrinsicOp op) const {
return is_intrinsic() && this->name == get_intrinsic_name(op);
}
bool is_intrinsic(std::initializer_list<IntrinsicOp> intrinsics) const {
for (IntrinsicOp i : intrinsics) {
if (is_intrinsic(i)) {
return true;
}
}
return false;
}
bool is_tag() const {
return is_intrinsic({Call::likely, Call::likely_if_innermost});
}
/** Returns a pointer to a call node if the expression is a call to
* one of the requested intrinsics. */
static const Call *as_intrinsic(const Expr &e, std::initializer_list<IntrinsicOp> intrinsics) {
if (const Call *c = e.as<Call>()) {
for (IntrinsicOp i : intrinsics) {
if (c->is_intrinsic(i)) {
return c;
}
}
}
return nullptr;
}
static const Call *as_tag(const Expr &e) {
return as_intrinsic(e, {Call::likely, Call::likely_if_innermost});
}
bool is_extern() const {
return (call_type == Extern ||
call_type == ExternCPlusPlus ||
call_type == PureExtern);
}
bool is_strict_float_intrinsic() const {
return is_intrinsic(
{Call::strict_add,
Call::strict_div,
Call::strict_max,
Call::strict_min,
Call::strict_mul,
Call::strict_sub,
Call::strict_lt,
Call::strict_le,
Call::strict_eq});
}
static const IRNodeType _node_type = IRNodeType::Call;
};
/** A named variable. Might be a loop variable, function argument,
* parameter, reduction variable, or something defined by a Let or
* LetStmt node. */
struct Variable : public ExprNode<Variable> {
std::string name;
/** References to scalar parameters, or to the dimensions of buffer
* parameters hang onto those expressions. */
Parameter param;
/** References to properties of literal image parameters. */
Buffer<> image;
/** Reduction variables hang onto their domains */
ReductionDomain reduction_domain;
static Expr make(Type type, const std::string &name) {
return make(type, name, Buffer<>(), Parameter(), ReductionDomain());
}
static Expr make(Type type, const std::string &name, Parameter param) {
return make(type, name, Buffer<>(), std::move(param), ReductionDomain());
}
static Expr make(Type type, const std::string &name, const Buffer<> &image) {
return make(type, name, image, Parameter(), ReductionDomain());
}
static Expr make(Type type, const std::string &name, ReductionDomain reduction_domain) {
return make(type, name, Buffer<>(), Parameter(), std::move(reduction_domain));
}
static Expr make(Type type, const std::string &name, Buffer<> image,
Parameter param, ReductionDomain reduction_domain);
static const IRNodeType _node_type = IRNodeType::Variable;
};
/** A for loop. Execute the 'body' statement for all values of the
* variable 'name' from 'min' to 'min + extent'. There are four
* types of For nodes. A 'Serial' for loop is a conventional
* one. In a 'Parallel' for loop, each iteration of the loop
* happens in parallel or in some unspecified order. In a
* 'Vectorized' for loop, each iteration maps to one SIMD lane,
* and the whole loop is executed in one shot. For this case,
* 'extent' must be some small integer constant (probably 4, 8, or
* 16). An 'Unrolled' for loop compiles to a completely unrolled
* version of the loop. Each iteration becomes its own
* statement. Again in this case, 'extent' should be a small
* integer constant. */
struct For : public StmtNode<For> {
std::string name;
Expr min, extent;
ForType for_type;
DeviceAPI device_api;
Stmt body;
Partition partition_policy;
static Stmt make(const std::string &name,
Expr min, Expr extent,
ForType for_type, Partition partition_policy,
DeviceAPI device_api,
Stmt body);
bool is_unordered_parallel() const {
return Halide::Internal::is_unordered_parallel(for_type);
}
bool is_parallel() const {
return Halide::Internal::is_parallel(for_type);
}
static const IRNodeType _node_type = IRNodeType::For;
};
struct Acquire : public StmtNode<Acquire> {
Expr semaphore;
Expr count;
Stmt body;
static Stmt make(Expr semaphore, Expr count, Stmt body);
static const IRNodeType _node_type = IRNodeType::Acquire;
};
/** Construct a new vector by taking elements from another sequence of
* vectors. */
struct Shuffle : public ExprNode<Shuffle> {
std::vector<Expr> vectors;
/** Indices indicating which vector element to place into the
* result. The elements are numbered by their position in the
* concatenation of the vector arguments. */
std::vector<int> indices;
static Expr make(const std::vector<Expr> &vectors,
const std::vector<int> &indices);
/** Convenience constructor for making a shuffle representing an
* interleaving of vectors of the same length. */
static Expr make_interleave(const std::vector<Expr> &vectors);
/** Convenience constructor for making a shuffle representing a
* concatenation of the vectors. */
static Expr make_concat(const std::vector<Expr> &vectors);
/** Convenience constructor for making a shuffle representing a
* broadcast of a vector. */
static Expr make_broadcast(Expr vector, int factor);
/** Convenience constructor for making a shuffle representing a
* contiguous subset of a vector. */
static Expr make_slice(Expr vector, int begin, int stride, int size);
/** Convenience constructor for making a shuffle representing
* extracting a single element. */
static Expr make_extract_element(Expr vector, int i);
/** Check if this shuffle is an interleaving of the vector
* arguments. */
bool is_interleave() const;
/** Check if this shuffle can be represented as a repeating pattern that
* repeats the same shuffle of the single input vector some number of times.
* For example: 0, 3, 1, 1, 0, 3, 1, 1, ....., 0, 3, 1, 1
*/
bool is_broadcast() const;
int broadcast_factor() const;
/** Check if this shuffle is a concatenation of the vector
* arguments. */
bool is_concat() const;
/** Check if this shuffle is a contiguous strict subset of the
* vector arguments, and if so, the offset and stride of the
* slice. */
///@{
bool is_slice() const;
int slice_begin() const {
return indices[0];
}
int slice_stride() const {
return indices.size() >= 2 ? indices[1] - indices[0] : 1;
}
///@}
/** Check if this shuffle is extracting a scalar from the vector
* arguments. */
bool is_extract_element() const;
/** Returns the sequence of vector and lane indices that represent each
* entry to be used for the shuffled vector */
std::vector<std::pair<int, int>> vector_and_lane_indices() const;
static const IRNodeType _node_type = IRNodeType::Shuffle;
};
/** Represent a multi-dimensional region of a Func or an ImageParam that
* needs to be prefetched. */
struct Prefetch : public StmtNode<Prefetch> {
std::string name;
std::vector<Type> types;
Region bounds;
PrefetchDirective prefetch;
Expr condition;
Stmt body;
static Stmt make(const std::string &name, const std::vector<Type> &types,
const Region &bounds,
const PrefetchDirective &prefetch,
Expr condition, Stmt body);
static const IRNodeType _node_type = IRNodeType::Prefetch;
};
/**
* Represents a location where storage will be hoisted to for a Func / Realize
* node with a given name.
*
*/
struct HoistedStorage : public StmtNode<HoistedStorage> {
std::string name;
Stmt body;
static Stmt make(const std::string &name,
Stmt body);
static const IRNodeType _node_type = IRNodeType::HoistedStorage;
};
/** Lock all the Store nodes in the body statement.
* Typically the lock is implemented by an atomic operation
* (e.g. atomic add or atomic compare-and-swap).
* However, if necessary, the node can access a mutex buffer through
* mutex_name and mutex_args, by lowering this node into
* calls to acquire and release the lock. */
struct Atomic : public StmtNode<Atomic> {
std::string producer_name;
std::string mutex_name; // empty string if not using mutex
Stmt body;
static Stmt make(const std::string &producer_name,
const std::string &mutex_name,
Stmt body);
static const IRNodeType _node_type = IRNodeType::Atomic;
};
/** Horizontally reduce a vector to a scalar or narrower vector using
* the given commutative and associative binary operator. The reduction
* factor is dictated by the number of lanes in the input and output
* types. Groups of adjacent lanes are combined. The number of lanes
* in the input type must be a divisor of the number of lanes of the
* output type. */
struct VectorReduce : public ExprNode<VectorReduce> {
// 99.9% of the time people will use this for horizontal addition,
// but these are all of our commutative and associative primitive
// operators.
typedef enum {
Add,
SaturatingAdd,
Mul,
Min,
Max,
And,
Or,
} Operator;
Expr value;
Operator op;
static Expr make(Operator op, Expr vec, int lanes);
static const IRNodeType _node_type = IRNodeType::VectorReduce;
};
} // namespace Internal
} // namespace Halide
#endif
Buffer.h
Expr.h
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt).
FunctionPtr.h
LoopPartitioningDirective.h
Defines the Partition enum.
ModulusRemainder.h
Routines for statically determining what expressions are divisible by.
Parameter.h
Defines the internal representation of parameters to halide piplines.
PrefetchDirective.h
Defines the PrefetchDirective struct.
Reduction.h
Defines internal classes related to Reduction Domains.
Type.h
Defines halide types.
HALIDE_EXPORT
#define HALIDE_EXPORT
Definition Util.h:39
Halide::Buffer<>
Halide::Internal::Function
A reference-counted handle to Halide's internal representation of a function.
Definition Function.h:39
Halide::Internal::ReductionDomain
A reference-counted handle on a reduction domain, which is just a vector of ReductionVariable.
Definition Reduction.h:38
Halide::Parameter
A reference-counted handle to a parameter to a halide pipeline.
Definition Parameter.h:40
Halide::Internal
Definition AbstractGenerator.h:24
Halide::Internal::begin
auto begin(reverse_adaptor< T > i)
Definition Util.h:471
Halide::Internal::ForType
ForType
An enum describing a type of loop traversal.
Definition Expr.h:406
Halide::Internal::is_unordered_parallel
bool is_unordered_parallel(ForType for_type)
Check if for_type executes for loop iterations in parallel and unordered.
Halide::Internal::is_parallel
bool is_parallel(ForType for_type)
Returns true if for_type executes for loop iterations in parallel.
Halide::Internal::IRNodeType
IRNodeType
All our IR node types get unique IDs for the purposes of RTTI.
Definition Expr.h:25
Halide::Internal::IRNodeType::VectorReduce
@ VectorReduce
Definition Expr.h:60
Halide::Internal::IRNodeType::Prefetch
@ Prefetch
Definition Expr.h:76
Halide::Internal::IRNodeType::Reinterpret
@ Reinterpret
Definition Expr.h:36
Halide::Internal::IRNodeType::ProducerConsumer
@ ProducerConsumer
Definition Expr.h:64
Halide::Internal::IRNodeType::EQ
@ EQ
Definition Expr.h:45
Halide::Internal::IRNodeType::Provide
@ Provide
Definition Expr.h:68
Halide::Internal::IRNodeType::Fork
@ Fork
Definition Expr.h:73
Halide::Internal::IRNodeType::For
@ For
Definition Expr.h:65
Halide::Internal::IRNodeType::Or
@ Or
Definition Expr.h:52
Halide::Internal::IRNodeType::Div
@ Div
Definition Expr.h:42
Halide::Internal::IRNodeType::Variable
@ Variable
Definition Expr.h:37
Halide::Internal::IRNodeType::Cast
@ Cast
Definition Expr.h:35
Halide::Internal::IRNodeType::Atomic
@ Atomic
Definition Expr.h:77
Halide::Internal::IRNodeType::AssertStmt
@ AssertStmt
Definition Expr.h:63
Halide::Internal::IRNodeType::Mul
@ Mul
Definition Expr.h:41
Halide::Internal::IRNodeType::Max
@ Max
Definition Expr.h:44
Halide::Internal::IRNodeType::Min
@ Min
Definition Expr.h:43
Halide::Internal::IRNodeType::Mod
@ Mod
Definition Expr.h:40
Halide::Internal::IRNodeType::Acquire
@ Acquire
Definition Expr.h:66
Halide::Internal::IRNodeType::Ramp
@ Ramp
Definition Expr.h:56
Halide::Internal::IRNodeType::LetStmt
@ LetStmt
Definition Expr.h:62
Halide::Internal::IRNodeType::Not
@ Not
Definition Expr.h:53
Halide::Internal::IRNodeType::IfThenElse
@ IfThenElse
Definition Expr.h:74
Halide::Internal::IRNodeType::Evaluate
@ Evaluate
Definition Expr.h:75
Halide::Internal::IRNodeType::Free
@ Free
Definition Expr.h:70
Halide::Internal::IRNodeType::HoistedStorage
@ HoistedStorage
Definition Expr.h:78
Halide::Internal::IRNodeType::Broadcast
@ Broadcast
Definition Expr.h:34
Halide::Internal::IRNodeType::And
@ And
Definition Expr.h:51
Halide::Internal::IRNodeType::Call
@ Call
Definition Expr.h:57
Halide::Internal::IRNodeType::LT
@ LT
Definition Expr.h:47
Halide::Internal::IRNodeType::Allocate
@ Allocate
Definition Expr.h:69
Halide::Internal::IRNodeType::Let
@ Let
Definition Expr.h:58
Halide::Internal::IRNodeType::Realize
@ Realize
Definition Expr.h:71
Halide::Internal::IRNodeType::GT
@ GT
Definition Expr.h:49
Halide::Internal::IRNodeType::LE
@ LE
Definition Expr.h:48
Halide::Internal::IRNodeType::NE
@ NE
Definition Expr.h:46
Halide::Internal::IRNodeType::Select
@ Select
Definition Expr.h:54
Halide::Internal::IRNodeType::Block
@ Block
Definition Expr.h:72
Halide::Internal::IRNodeType::Sub
@ Sub
Definition Expr.h:39
Halide::Internal::IRNodeType::Shuffle
@ Shuffle
Definition Expr.h:59
Halide::Internal::IRNodeType::Add
@ Add
Definition Expr.h:38
Halide::Internal::IRNodeType::Load
@ Load
Definition Expr.h:55
Halide::Internal::IRNodeType::GE
@ GE
Definition Expr.h:50
Halide::Internal::IRNodeType::Store
@ Store
Definition Expr.h:67
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition AbstractGenerator.h:19
Halide::DeviceAPI
DeviceAPI
An enum describing a type of device API.
Definition DeviceAPI.h:15
Halide::Region
std::vector< Range > Region
A multi-dimensional box.
Definition Expr.h:350
Halide::MemoryType
MemoryType
An enum describing different address spaces to be used with Func::store_in.
Definition Expr.h:353
Halide::Partition
Partition
Different ways to handle loops with a potentially optimizable boundary conditions.
Definition LoopPartitioningDirective.h:16
int32_t
signed __INT32_TYPE__ int32_t
Definition runtime_internal.h:24
Halide::Expr
A fragment of Halide syntax.
Definition Expr.h:258
Halide::Internal::Acquire
Definition IR.h:872
Halide::Internal::Acquire::count
Expr count
Definition IR.h:874
Halide::Internal::Acquire::_node_type
static const IRNodeType _node_type
Definition IR.h:879
Halide::Internal::Acquire::body
Stmt body
Definition IR.h:875
Halide::Internal::Acquire::make
static Stmt make(Expr semaphore, Expr count, Stmt body)
Halide::Internal::Acquire::semaphore
Expr semaphore
Definition IR.h:873
Halide::Internal::Add
The sum of two expressions.
Definition IR.h:56
Halide::Internal::Add::b
Expr b
Definition IR.h:57
Halide::Internal::Add::make
static Expr make(Expr a, Expr b)
Halide::Internal::Add::_node_type
static const IRNodeType _node_type
Definition IR.h:61
Halide::Internal::Add::a
Expr a
Definition IR.h:57
Halide::Internal::Allocate
Allocate a scratch area called with the given name, type, and size.
Definition IR.h:371
Halide::Internal::Allocate::type
Type type
Definition IR.h:373
Halide::Internal::Allocate::name
std::string name
Definition IR.h:372
Halide::Internal::Allocate::condition
Expr condition
Definition IR.h:378
Halide::Internal::Allocate::new_expr
Expr new_expr
Definition IR.h:387
Halide::Internal::Allocate::extents
std::vector< Expr > extents
Definition IR.h:375
Halide::Internal::Allocate::constant_allocation_size
static int32_t constant_allocation_size(const std::vector< Expr > &extents, const std::string &name)
A routine to check if the extents are all constants, and if so verify the total size is less than 2^3...
Halide::Internal::Allocate::_node_type
static const IRNodeType _node_type
Definition IR.h:409
Halide::Internal::Allocate::constant_allocation_size
int32_t constant_allocation_size() const
Halide::Internal::Allocate::memory_type
MemoryType memory_type
Definition IR.h:374
Halide::Internal::Allocate::body
Stmt body
Definition IR.h:394
Halide::Internal::Allocate::free_function
std::string free_function
Definition IR.h:388
Halide::Internal::Allocate::padding
int padding
Definition IR.h:392
Halide::Internal::Allocate::make
static Stmt make(const std::string &name, Type type, MemoryType memory_type, const std::vector< Expr > &extents, Expr condition, Stmt body, Expr new_expr=Expr(), const std::string &free_function=std::string(), int padding=0)
Halide::Internal::And
Logical and - are both expressions true.
Definition IR.h:175
Halide::Internal::And::b
Expr b
Definition IR.h:176
Halide::Internal::And::a
Expr a
Definition IR.h:176
Halide::Internal::And::_node_type
static const IRNodeType _node_type
Definition IR.h:180
Halide::Internal::And::make
static Expr make(Expr a, Expr b)
Halide::Internal::AssertStmt
If the 'condition' is false, then evaluate and return the message, which should be a call to an error...
Definition IR.h:294
Halide::Internal::AssertStmt::_node_type
static const IRNodeType _node_type
Definition IR.h:301
Halide::Internal::AssertStmt::message
Expr message
Definition IR.h:297
Halide::Internal::AssertStmt::condition
Expr condition
Definition IR.h:296
Halide::Internal::AssertStmt::make
static Stmt make(Expr condition, Expr message)
Halide::Internal::Atomic
Lock all the Store nodes in the body statement.
Definition IR.h:994
Halide::Internal::Atomic::body
Stmt body
Definition IR.h:997
Halide::Internal::Atomic::_node_type
static const IRNodeType _node_type
Definition IR.h:1003
Halide::Internal::Atomic::make
static Stmt make(const std::string &producer_name, const std::string &mutex_name, Stmt body)
Halide::Internal::Atomic::mutex_name
std::string mutex_name
Definition IR.h:996
Halide::Internal::Atomic::producer_name
std::string producer_name
Definition IR.h:995
Halide::Internal::BaseExprNode::type
Type type
Definition Expr.h:148
Halide::Internal::Block
A sequence of statements to be executed in-order.
Definition IR.h:442
Halide::Internal::Block::rest
Stmt rest
Definition IR.h:443
Halide::Internal::Block::first
Stmt first
Definition IR.h:443
Halide::Internal::Block::make
static Stmt make(const std::vector< Stmt > &stmts)
Construct zero or more Blocks to invoke a list of statements in order.
Halide::Internal::Block::make
static Stmt make(Stmt first, Stmt rest)
Halide::Internal::Block::_node_type
static const IRNodeType _node_type
Definition IR.h:451
Halide::Internal::Broadcast
A vector with 'lanes' elements, in which every element is 'value'.
Definition IR.h:259
Halide::Internal::Broadcast::make
static Expr make(Expr value, int lanes)
Halide::Internal::Broadcast::value
Expr value
Definition IR.h:260
Halide::Internal::Broadcast::_node_type
static const IRNodeType _node_type
Definition IR.h:265
Halide::Internal::Broadcast::lanes
int lanes
Definition IR.h:261
Halide::Internal::Call
A function call.
Definition IR.h:490
Halide::Internal::Call::make
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())
Halide::Internal::Call::buffer_get_max
static HALIDE_EXPORT ConstString buffer_get_max
Definition IR.h:671
Halide::Internal::Call::as_tag
static const Call * as_tag(const Expr &e)
Definition IR.h:772
Halide::Internal::Call::make
static Expr make(const Function &func, const std::vector< Expr > &args, int idx=0)
Convenience constructor for calls to other halide functions.
Halide::Internal::Call::buffer_get_host_dirty
static HALIDE_EXPORT ConstString buffer_get_host_dirty
Definition IR.h:676
Halide::Internal::Call::buffer_set_bounds
static HALIDE_EXPORT ConstString buffer_set_bounds
Definition IR.h:685
Halide::Internal::Call::ConstString
const char *const ConstString
Definition IR.h:509
Halide::Internal::Call::is_tag
bool is_tag() const
Definition IR.h:755
Halide::Internal::Call::as_intrinsic
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.
Definition IR.h:761
Halide::Internal::Call::is_strict_float_intrinsic
bool is_strict_float_intrinsic() const
Definition IR.h:782
Halide::Internal::Call::IntrinsicOp
IntrinsicOp
Definition IR.h:518
Halide::Internal::Call::get_user_context
@ get_user_context
Definition IR.h:549
Halide::Internal::Call::strict_min
@ strict_min
Definition IR.h:624
Halide::Internal::Call::strict_div
@ strict_div
Definition IR.h:619
Halide::Internal::Call::call_cached_indirect_function
@ call_cached_indirect_function
Definition IR.h:531
Halide::Internal::Call::signed_integer_overflow
@ signed_integer_overflow
Definition IR.h:595
Halide::Internal::Call::stringify
@ stringify
Definition IR.h:629
Halide::Internal::Call::hvx_scatter
@ hvx_scatter
Definition IR.h:554
Halide::Internal::Call::gpu_thread_barrier
@ gpu_thread_barrier
Definition IR.h:550
Halide::Internal::Call::require
@ require
Definition IR.h:576
Halide::Internal::Call::if_then_else
@ if_then_else
Definition IR.h:557
Halide::Internal::Call::skip_stages_marker
@ skip_stages_marker
Definition IR.h:600
Halide::Internal::Call::widen_right_mul
@ widen_right_mul
Definition IR.h:646
Halide::Internal::Call::declare_box_touched
@ declare_box_touched
Definition IR.h:540
Halide::Internal::Call::mod_round_to_zero
@ mod_round_to_zero
Definition IR.h:567
Halide::Internal::Call::register_destructor
@ register_destructor
Definition IR.h:575
Halide::Internal::Call::widening_mul
@ widening_mul
Definition IR.h:651
Halide::Internal::Call::count_leading_zeros
@ count_leading_zeros
Definition IR.h:537
Halide::Internal::Call::unsafe_promise_clamped
@ unsafe_promise_clamped
Definition IR.h:640
Halide::Internal::Call::saturating_add
@ saturating_add
Definition IR.h:588
Halide::Internal::Call::rewrite_buffer
@ rewrite_buffer
Definition IR.h:579
Halide::Internal::Call::abs
@ abs
Definition IR.h:519
Halide::Internal::Call::prefetch
@ prefetch
Definition IR.h:571
Halide::Internal::Call::alloca
@ alloca
Definition IR.h:522
Halide::Internal::Call::concat_bits
@ concat_bits
Definition IR.h:536
Halide::Internal::Call::round
@ round
Definition IR.h:582
Halide::Internal::Call::div_round_to_zero
@ div_round_to_zero
Definition IR.h:541
Halide::Internal::Call::mux
@ mux
Definition IR.h:569
Halide::Internal::Call::debug_to_file
@ debug_to_file
Definition IR.h:539
Halide::Internal::Call::make_struct
@ make_struct
Definition IR.h:565
Halide::Internal::Call::halving_add
@ halving_add
Definition IR.h:551
Halide::Internal::Call::shift_left
@ shift_left
Definition IR.h:593
Halide::Internal::Call::promise_clamped
@ promise_clamped
Definition IR.h:573
Halide::Internal::Call::return_second
@ return_second
Definition IR.h:578
Halide::Internal::Call::strict_mul
@ strict_mul
Definition IR.h:625
Halide::Internal::Call::mul_shift_right
@ mul_shift_right
Definition IR.h:568
Halide::Internal::Call::saturating_sub
@ saturating_sub
Definition IR.h:589
Halide::Internal::Call::widening_add
@ widening_add
Definition IR.h:650
Halide::Internal::Call::memoize_expr
@ memoize_expr
Definition IR.h:566
Halide::Internal::Call::widening_sub
@ widening_sub
Definition IR.h:654
Halide::Internal::Call::saturating_cast
@ saturating_cast
Definition IR.h:590
Halide::Internal::Call::unreachable
@ unreachable
Definition IR.h:639
Halide::Internal::Call::if_then_else_mask
@ if_then_else_mask
Definition IR.h:558
Halide::Internal::Call::add_image_checks_marker
@ add_image_checks_marker
Definition IR.h:521
Halide::Internal::Call::bool_to_mask
@ bool_to_mask
Definition IR.h:527
Halide::Internal::Call::sliding_window_marker
@ sliding_window_marker
Definition IR.h:609
Halide::Internal::Call::rounding_mul_shift_right
@ rounding_mul_shift_right
Definition IR.h:585
Halide::Internal::Call::strict_eq
@ strict_eq
Definition IR.h:620
Halide::Internal::Call::random
@ random
Definition IR.h:574
Halide::Internal::Call::load_typed_struct_member
@ load_typed_struct_member
Definition IR.h:564
Halide::Internal::Call::hvx_scatter_acc
@ hvx_scatter_acc
Definition IR.h:555
Halide::Internal::Call::shift_right
@ shift_right
Definition IR.h:594
Halide::Internal::Call::select_mask
@ select_mask
Definition IR.h:592
Halide::Internal::Call::popcount
@ popcount
Definition IR.h:570
Halide::Internal::Call::target_os_is
@ target_os_is
Definition IR.h:636
Halide::Internal::Call::extract_bits
@ extract_bits
Definition IR.h:547
Halide::Internal::Call::halving_sub
@ halving_sub
Definition IR.h:552
Halide::Internal::Call::bundle
@ bundle
Definition IR.h:530
Halide::Internal::Call::count_trailing_zeros
@ count_trailing_zeros
Definition IR.h:538
Halide::Internal::Call::likely
@ likely
Definition IR.h:562
Halide::Internal::Call::widen_right_add
@ widen_right_add
Definition IR.h:644
Halide::Internal::Call::strict_add
@ strict_add
Definition IR.h:618
Halide::Internal::Call::bitwise_and
@ bitwise_and
Definition IR.h:523
Halide::Internal::Call::image_load
@ image_load
Definition IR.h:559
Halide::Internal::Call::widening_shift_left
@ widening_shift_left
Definition IR.h:652
Halide::Internal::Call::require_mask
@ require_mask
Definition IR.h:577
Halide::Internal::Call::dynamic_shuffle
@ dynamic_shuffle
Definition IR.h:542
Halide::Internal::Call::scatter_gather
@ scatter_gather
Definition IR.h:591
Halide::Internal::Call::target_bits
@ target_bits
Definition IR.h:633
Halide::Internal::Call::image_store
@ image_store
Definition IR.h:560
Halide::Internal::Call::strict_sub
@ strict_sub
Definition IR.h:626
Halide::Internal::Call::bitwise_not
@ bitwise_not
Definition IR.h:524
Halide::Internal::Call::bitwise_or
@ bitwise_or
Definition IR.h:525
Halide::Internal::Call::lerp
@ lerp
Definition IR.h:561
Halide::Internal::Call::absd
@ absd
Definition IR.h:520
Halide::Internal::Call::strict_le
@ strict_le
Definition IR.h:621
Halide::Internal::Call::widen_right_sub
@ widen_right_sub
Definition IR.h:648
Halide::Internal::Call::rounding_shift_right
@ rounding_shift_right
Definition IR.h:587
Halide::Internal::Call::hvx_scatter_release
@ hvx_scatter_release
Definition IR.h:556
Halide::Internal::Call::target_has_feature
@ target_has_feature
Definition IR.h:634
Halide::Internal::Call::widening_shift_right
@ widening_shift_right
Definition IR.h:653
Halide::Internal::Call::IntrinsicOpCount
@ IntrinsicOpCount
Definition IR.h:658
Halide::Internal::Call::sorted_avg
@ sorted_avg
Definition IR.h:612
Halide::Internal::Call::strict_max
@ strict_max
Definition IR.h:623
Halide::Internal::Call::rounding_halving_add
@ rounding_halving_add
Definition IR.h:584
Halide::Internal::Call::hvx_gather
@ hvx_gather
Definition IR.h:553
Halide::Internal::Call::extract_mask_element
@ extract_mask_element
Definition IR.h:548
Halide::Internal::Call::bitwise_xor
@ bitwise_xor
Definition IR.h:526
Halide::Internal::Call::rounding_shift_left
@ rounding_shift_left
Definition IR.h:586
Halide::Internal::Call::likely_if_innermost
@ likely_if_innermost
Definition IR.h:563
Halide::Internal::Call::profiling_enable_instance_marker
@ profiling_enable_instance_marker
Definition IR.h:572
Halide::Internal::Call::target_arch_is
@ target_arch_is
Definition IR.h:632
Halide::Internal::Call::target_natural_vector_size
@ target_natural_vector_size
Definition IR.h:635
Halide::Internal::Call::cast_mask
@ cast_mask
Definition IR.h:532
Halide::Internal::Call::undef
@ undef
Definition IR.h:638
Halide::Internal::Call::strict_lt
@ strict_lt
Definition IR.h:622
Halide::Internal::Call::get_runtime_vscale
@ get_runtime_vscale
Definition IR.h:656
Halide::Internal::Call::size_of_halide_buffer_t
@ size_of_halide_buffer_t
Definition IR.h:596
Halide::Internal::Call::is_extern
bool is_extern() const
Definition IR.h:776
Halide::Internal::Call::CallType
CallType
Definition IR.h:493
Halide::Internal::Call::Extern
@ Extern
A call to an external C-ABI function, possibly with side-effects.
Definition IR.h:494
Halide::Internal::Call::ExternCPlusPlus
@ ExternCPlusPlus
A call to an external C-ABI function, possibly with side-effects.
Definition IR.h:495
Halide::Internal::Call::Image
@ Image
A load from an input image.
Definition IR.h:493
Halide::Internal::Call::Intrinsic
@ Intrinsic
A possibly-side-effecty compiler intrinsic, which has special handling during codegen.
Definition IR.h:498
Halide::Internal::Call::PureExtern
@ PureExtern
A call to a guaranteed-side-effect-free external function.
Definition IR.h:496
Halide::Internal::Call::PureIntrinsic
@ PureIntrinsic
A side-effect-free version of the above.
Definition IR.h:499
Halide::Internal::Call::name
std::string name
Definition IR.h:491
Halide::Internal::Call::buffer_get_min
static HALIDE_EXPORT ConstString buffer_get_min
Definition IR.h:668
Halide::Internal::Call::is_intrinsic
bool is_intrinsic() const
Definition IR.h:737
Halide::Internal::Call::buffer_get_device_interface
static HALIDE_EXPORT ConstString buffer_get_device_interface
Definition IR.h:674
Halide::Internal::Call::buffer_get_dimensions
static HALIDE_EXPORT ConstString buffer_get_dimensions
Definition IR.h:667
Halide::Internal::Call::buffer_get_device_dirty
static HALIDE_EXPORT ConstString buffer_get_device_dirty
Definition IR.h:677
Halide::Internal::Call::buffer_crop
static HALIDE_EXPORT ConstString buffer_crop
Definition IR.h:684
Halide::Internal::Call::func
FunctionPtr func
Definition IR.h:690
Halide::Internal::Call::call_type
CallType call_type
Definition IR.h:501
Halide::Internal::Call::buffer_get_host
static HALIDE_EXPORT ConstString buffer_get_host
Definition IR.h:672
Halide::Internal::Call::make
static Expr make(const Buffer<> &image, const std::vector< Expr > &args)
Convenience constructor for loads from concrete images.
Definition IR.h:716
Halide::Internal::Call::buffer_get_device
static HALIDE_EXPORT ConstString buffer_get_device
Definition IR.h:673
Halide::Internal::Call::buffer_init
static HALIDE_EXPORT ConstString buffer_init
Definition IR.h:682
Halide::Internal::Call::image
Buffer image
Definition IR.h:698
Halide::Internal::Call::is_pure
bool is_pure() const
Check if a call node is pure within a pipeline, meaning that the same args always give the same resul...
Definition IR.h:731
Halide::Internal::Call::buffer_get_stride
static HALIDE_EXPORT ConstString buffer_get_stride
Definition IR.h:670
Halide::Internal::Call::buffer_get_extent
static HALIDE_EXPORT ConstString buffer_get_extent
Definition IR.h:669
Halide::Internal::Call::is_intrinsic
bool is_intrinsic(std::initializer_list< IntrinsicOp > intrinsics) const
Definition IR.h:746
Halide::Internal::Call::get_intrinsic_name
static const char * get_intrinsic_name(IntrinsicOp op)
Halide::Internal::Call::is_intrinsic
bool is_intrinsic(IntrinsicOp op) const
Definition IR.h:742
Halide::Internal::Call::make
static Expr make(const Parameter &param, const std::vector< Expr > &args)
Convenience constructor for loads from images parameters.
Definition IR.h:721
Halide::Internal::Call::_node_type
static const IRNodeType _node_type
Definition IR.h:795
Halide::Internal::Call::trace
static HALIDE_EXPORT ConstString trace
Definition IR.h:686
Halide::Internal::Call::args
std::vector< Expr > args
Definition IR.h:492
Halide::Internal::Call::buffer_get_shape
static HALIDE_EXPORT ConstString buffer_get_shape
Definition IR.h:675
Halide::Internal::Call::make
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())
Halide::Internal::Call::param
Parameter param
Definition IR.h:702
Halide::Internal::Call::buffer_is_bounds_query
static HALIDE_EXPORT ConstString buffer_is_bounds_query
Definition IR.h:681
Halide::Internal::Call::buffer_get_type
static HALIDE_EXPORT ConstString buffer_get_type
Definition IR.h:678
Halide::Internal::Call::buffer_set_device_dirty
static HALIDE_EXPORT ConstString buffer_set_device_dirty
Definition IR.h:680
Halide::Internal::Call::buffer_set_host_dirty
static HALIDE_EXPORT ConstString buffer_set_host_dirty
Definition IR.h:679
Halide::Internal::Call::value_index
int value_index
Definition IR.h:694
Halide::Internal::Call::buffer_init_from_buffer
static HALIDE_EXPORT ConstString buffer_init_from_buffer
Definition IR.h:683
Halide::Internal::Cast
The actual IR nodes begin here.
Definition IR.h:30
Halide::Internal::Cast::_node_type
static const IRNodeType _node_type
Definition IR.h:35
Halide::Internal::Cast::make
static Expr make(Type t, Expr v)
Halide::Internal::Cast::value
Expr value
Definition IR.h:31
Halide::Internal::Cast::is_reinterpret
bool is_reinterpret() const
Check if the cast is equivalent to a reinterpret.
Definition IR.h:38
Halide::Internal::Div
The ratio of two expressions.
Definition IR.h:83
Halide::Internal::Div::_node_type
static const IRNodeType _node_type
Definition IR.h:88
Halide::Internal::Div::b
Expr b
Definition IR.h:84
Halide::Internal::Div::a
Expr a
Definition IR.h:84
Halide::Internal::Div::make
static Expr make(Expr a, Expr b)
Halide::Internal::EQ
Is the first expression equal to the second.
Definition IR.h:121
Halide::Internal::EQ::_node_type
static const IRNodeType _node_type
Definition IR.h:126
Halide::Internal::EQ::a
Expr a
Definition IR.h:122
Halide::Internal::EQ::b
Expr b
Definition IR.h:122
Halide::Internal::EQ::make
static Expr make(Expr a, Expr b)
Halide::Internal::Evaluate
Evaluate and discard an expression, presumably because it has some side-effect.
Definition IR.h:476
Halide::Internal::Evaluate::make
static Stmt make(Expr v)
Halide::Internal::Evaluate::value
Expr value
Definition IR.h:477
Halide::Internal::Evaluate::_node_type
static const IRNodeType _node_type
Definition IR.h:481
Halide::Internal::ExprNode< Cast >::ExprNode
ExprNode()
Definition Expr.h:161
Halide::Internal::For
A for loop.
Definition IR.h:848
Halide::Internal::For::partition_policy
Partition partition_policy
Definition IR.h:854
Halide::Internal::For::min
Expr min
Definition IR.h:850
Halide::Internal::For::name
std::string name
Definition IR.h:849
Halide::Internal::For::device_api
DeviceAPI device_api
Definition IR.h:852
Halide::Internal::For::for_type
ForType for_type
Definition IR.h:851
Halide::Internal::For::is_parallel
bool is_parallel() const
Definition IR.h:865
Halide::Internal::For::is_unordered_parallel
bool is_unordered_parallel() const
Definition IR.h:862
Halide::Internal::For::_node_type
static const IRNodeType _node_type
Definition IR.h:869
Halide::Internal::For::extent
Expr extent
Definition IR.h:850
Halide::Internal::For::make
static Stmt make(const std::string &name, Expr min, Expr extent, ForType for_type, Partition partition_policy, DeviceAPI device_api, Stmt body)
Halide::Internal::For::body
Stmt body
Definition IR.h:853
Halide::Internal::Fork
A pair of statements executed concurrently.
Definition IR.h:457
Halide::Internal::Fork::make
static Stmt make(Stmt first, Stmt rest)
Halide::Internal::Fork::_node_type
static const IRNodeType _node_type
Definition IR.h:462
Halide::Internal::Fork::first
Stmt first
Definition IR.h:458
Halide::Internal::Fork::rest
Stmt rest
Definition IR.h:458
Halide::Internal::Free
Free the resources associated with the given buffer.
Definition IR.h:413
Halide::Internal::Free::_node_type
static const IRNodeType _node_type
Definition IR.h:418
Halide::Internal::Free::make
static Stmt make(const std::string &name)
Halide::Internal::Free::name
std::string name
Definition IR.h:414
Halide::Internal::FunctionPtr
A possibly-weak pointer to a Halide function.
Definition FunctionPtr.h:27
Halide::Internal::GE
Is the first expression greater than or equal to the second.
Definition IR.h:166
Halide::Internal::GE::a
Expr a
Definition IR.h:167
Halide::Internal::GE::b
Expr b
Definition IR.h:167
Halide::Internal::GE::_node_type
static const IRNodeType _node_type
Definition IR.h:171
Halide::Internal::GE::make
static Expr make(Expr a, Expr b)
Halide::Internal::GT
Is the first expression greater than the second.
Definition IR.h:157
Halide::Internal::GT::b
Expr b
Definition IR.h:158
Halide::Internal::GT::a
Expr a
Definition IR.h:158
Halide::Internal::GT::_node_type
static const IRNodeType _node_type
Definition IR.h:162
Halide::Internal::GT::make
static Expr make(Expr a, Expr b)
Halide::Internal::HoistedStorage
Represents a location where storage will be hoisted to for a Func / Realize node with a given name.
Definition IR.h:978
Halide::Internal::HoistedStorage::make
static Stmt make(const std::string &name, Stmt body)
Halide::Internal::HoistedStorage::_node_type
static const IRNodeType _node_type
Definition IR.h:985
Halide::Internal::HoistedStorage::name
std::string name
Definition IR.h:979
Halide::Internal::HoistedStorage::body
Stmt body
Definition IR.h:980
Halide::Internal::IRHandle::as
const T * as() const
Downcast this ir node to its actual type (e.g.
Definition Expr.h:205
Halide::Internal::IfThenElse
An if-then-else block.
Definition IR.h:466
Halide::Internal::IfThenElse::_node_type
static const IRNodeType _node_type
Definition IR.h:472
Halide::Internal::IfThenElse::make
static Stmt make(Expr condition, Stmt then_case, Stmt else_case=Stmt())
Halide::Internal::IfThenElse::condition
Expr condition
Definition IR.h:467
Halide::Internal::IfThenElse::then_case
Stmt then_case
Definition IR.h:468
Halide::Internal::IfThenElse::else_case
Stmt else_case
Definition IR.h:468
Halide::Internal::LE
Is the first expression less than or equal to the second.
Definition IR.h:148
Halide::Internal::LE::b
Expr b
Definition IR.h:149
Halide::Internal::LE::make
static Expr make(Expr a, Expr b)
Halide::Internal::LE::a
Expr a
Definition IR.h:149
Halide::Internal::LE::_node_type
static const IRNodeType _node_type
Definition IR.h:153
Halide::Internal::LT
Is the first expression less than the second.
Definition IR.h:139
Halide::Internal::LT::a
Expr a
Definition IR.h:140
Halide::Internal::LT::make
static Expr make(Expr a, Expr b)
Halide::Internal::LT::b
Expr b
Definition IR.h:140
Halide::Internal::LT::_node_type
static const IRNodeType _node_type
Definition IR.h:144
Halide::Internal::Let
A let expression, like you might find in a functional language.
Definition IR.h:271
Halide::Internal::Let::value
Expr value
Definition IR.h:273
Halide::Internal::Let::name
std::string name
Definition IR.h:272
Halide::Internal::Let::body
Expr body
Definition IR.h:273
Halide::Internal::Let::make
static Expr make(const std::string &name, Expr value, Expr body)
Halide::Internal::Let::_node_type
static const IRNodeType _node_type
Definition IR.h:277
Halide::Internal::LetStmt
The statement form of a let node.
Definition IR.h:282
Halide::Internal::LetStmt::make
static Stmt make(const std::string &name, Expr value, Stmt body)
Halide::Internal::LetStmt::name
std::string name
Definition IR.h:283
Halide::Internal::LetStmt::_node_type
static const IRNodeType _node_type
Definition IR.h:289
Halide::Internal::LetStmt::value
Expr value
Definition IR.h:284
Halide::Internal::LetStmt::body
Stmt body
Definition IR.h:285
Halide::Internal::Load
Load a value from a named symbol if predicate is true.
Definition IR.h:217
Halide::Internal::Load::predicate
Expr predicate
Definition IR.h:220
Halide::Internal::Load::name
std::string name
Definition IR.h:218
Halide::Internal::Load::image
Buffer image
Definition IR.h:224
Halide::Internal::Load::index
Expr index
Definition IR.h:220
Halide::Internal::Load::make
static Expr make(Type type, const std::string &name, Expr index, Buffer<> image, Parameter param, Expr predicate, ModulusRemainder alignment)
Halide::Internal::Load::param
Parameter param
Definition IR.h:227
Halide::Internal::Load::_node_type
static const IRNodeType _node_type
Definition IR.h:239
Halide::Internal::Load::alignment
ModulusRemainder alignment
Definition IR.h:231
Halide::Internal::Max
The greater of two values.
Definition IR.h:112
Halide::Internal::Max::b
Expr b
Definition IR.h:113
Halide::Internal::Max::a
Expr a
Definition IR.h:113
Halide::Internal::Max::_node_type
static const IRNodeType _node_type
Definition IR.h:117
Halide::Internal::Max::make
static Expr make(Expr a, Expr b)
Halide::Internal::Min
The lesser of two values.
Definition IR.h:103
Halide::Internal::Min::b
Expr b
Definition IR.h:104
Halide::Internal::Min::a
Expr a
Definition IR.h:104
Halide::Internal::Min::_node_type
static const IRNodeType _node_type
Definition IR.h:108
Halide::Internal::Min::make
static Expr make(Expr a, Expr b)
Halide::Internal::Mod
The remainder of a / b.
Definition IR.h:94
Halide::Internal::Mod::_node_type
static const IRNodeType _node_type
Definition IR.h:99
Halide::Internal::Mod::a
Expr a
Definition IR.h:95
Halide::Internal::Mod::b
Expr b
Definition IR.h:95
Halide::Internal::Mod::make
static Expr make(Expr a, Expr b)
Halide::Internal::ModulusRemainder
The result of modulus_remainder analysis.
Definition ModulusRemainder.h:33
Halide::Internal::Mul
The product of two expressions.
Definition IR.h:74
Halide::Internal::Mul::a
Expr a
Definition IR.h:75
Halide::Internal::Mul::b
Expr b
Definition IR.h:75
Halide::Internal::Mul::_node_type
static const IRNodeType _node_type
Definition IR.h:79
Halide::Internal::Mul::make
static Expr make(Expr a, Expr b)
Halide::Internal::NE
Is the first expression not equal to the second.
Definition IR.h:130
Halide::Internal::NE::_node_type
static const IRNodeType _node_type
Definition IR.h:135
Halide::Internal::NE::b
Expr b
Definition IR.h:131
Halide::Internal::NE::a
Expr a
Definition IR.h:131
Halide::Internal::NE::make
static Expr make(Expr a, Expr b)
Halide::Internal::Not
Logical not - true if the expression false.
Definition IR.h:193
Halide::Internal::Not::make
static Expr make(Expr a)
Halide::Internal::Not::a
Expr a
Definition IR.h:194
Halide::Internal::Not::_node_type
static const IRNodeType _node_type
Definition IR.h:198
Halide::Internal::Or
Logical or - is at least one of the expression true.
Definition IR.h:184
Halide::Internal::Or::make
static Expr make(Expr a, Expr b)
Halide::Internal::Or::b
Expr b
Definition IR.h:185
Halide::Internal::Or::a
Expr a
Definition IR.h:185
Halide::Internal::Or::_node_type
static const IRNodeType _node_type
Definition IR.h:189
Halide::Internal::PrefetchDirective
Definition PrefetchDirective.h:37
Halide::Internal::Prefetch
Represent a multi-dimensional region of a Func or an ImageParam that needs to be prefetched.
Definition IR.h:956
Halide::Internal::Prefetch::make
static Stmt make(const std::string &name, const std::vector< Type > &types, const Region &bounds, const PrefetchDirective &prefetch, Expr condition, Stmt body)
Halide::Internal::Prefetch::condition
Expr condition
Definition IR.h:961
Halide::Internal::Prefetch::_node_type
static const IRNodeType _node_type
Definition IR.h:970
Halide::Internal::Prefetch::prefetch
PrefetchDirective prefetch
Definition IR.h:960
Halide::Internal::Prefetch::types
std::vector< Type > types
Definition IR.h:958
Halide::Internal::Prefetch::body
Stmt body
Definition IR.h:963
Halide::Internal::Prefetch::bounds
Region bounds
Definition IR.h:959
Halide::Internal::Prefetch::name
std::string name
Definition IR.h:957
Halide::Internal::ProducerConsumer
This node is a helpful annotation to do with permissions.
Definition IR.h:315
Halide::Internal::ProducerConsumer::_node_type
static const IRNodeType _node_type
Definition IR.h:325
Halide::Internal::ProducerConsumer::body
Stmt body
Definition IR.h:318
Halide::Internal::ProducerConsumer::make_consume
static Stmt make_consume(const std::string &name, Stmt body)
Halide::Internal::ProducerConsumer::name
std::string name
Definition IR.h:316
Halide::Internal::ProducerConsumer::is_producer
bool is_producer
Definition IR.h:317
Halide::Internal::ProducerConsumer::make_produce
static Stmt make_produce(const std::string &name, Stmt body)
Halide::Internal::ProducerConsumer::make
static Stmt make(const std::string &name, bool is_producer, Stmt body)
Halide::Internal::Provide
This defines the value of a function at a multi-dimensional location.
Definition IR.h:354
Halide::Internal::Provide::_node_type
static const IRNodeType _node_type
Definition IR.h:362
Halide::Internal::Provide::name
std::string name
Definition IR.h:355
Halide::Internal::Provide::predicate
Expr predicate
Definition IR.h:358
Halide::Internal::Provide::values
std::vector< Expr > values
Definition IR.h:356
Halide::Internal::Provide::args
std::vector< Expr > args
Definition IR.h:357
Halide::Internal::Provide::make
static Stmt make(const std::string &name, const std::vector< Expr > &values, const std::vector< Expr > &args, const Expr &predicate)
Halide::Internal::Ramp
A linear ramp vector node.
Definition IR.h:247
Halide::Internal::Ramp::stride
Expr stride
Definition IR.h:248
Halide::Internal::Ramp::_node_type
static const IRNodeType _node_type
Definition IR.h:253
Halide::Internal::Ramp::lanes
int lanes
Definition IR.h:249
Halide::Internal::Ramp::make
static Expr make(Expr base, Expr stride, int lanes)
Halide::Internal::Ramp::base
Expr base
Definition IR.h:248
Halide::Internal::Realize
Allocate a multi-dimensional buffer of the given type and size.
Definition IR.h:427
Halide::Internal::Realize::bounds
Region bounds
Definition IR.h:431
Halide::Internal::Realize::make
static Stmt make(const std::string &name, const std::vector< Type > &types, MemoryType memory_type, const Region &bounds, Expr condition, Stmt body)
Halide::Internal::Realize::memory_type
MemoryType memory_type
Definition IR.h:430
Halide::Internal::Realize::condition
Expr condition
Definition IR.h:432
Halide::Internal::Realize::types
std::vector< Type > types
Definition IR.h:429
Halide::Internal::Realize::body
Stmt body
Definition IR.h:433
Halide::Internal::Realize::_node_type
static const IRNodeType _node_type
Definition IR.h:437
Halide::Internal::Realize::name
std::string name
Definition IR.h:428
Halide::Internal::Reinterpret
Reinterpret value as another type, without affecting any of the bits (on little-endian systems).
Definition IR.h:47
Halide::Internal::Reinterpret::value
Expr value
Definition IR.h:48
Halide::Internal::Reinterpret::_node_type
static const IRNodeType _node_type
Definition IR.h:52
Halide::Internal::Reinterpret::make
static Expr make(Type t, Expr v)
Halide::Internal::Select
A ternary operator.
Definition IR.h:204
Halide::Internal::Select::make
static Expr make(Expr condition, Expr true_value, Expr false_value)
Halide::Internal::Select::false_value
Expr false_value
Definition IR.h:205
Halide::Internal::Select::true_value
Expr true_value
Definition IR.h:205
Halide::Internal::Select::condition
Expr condition
Definition IR.h:205
Halide::Internal::Select::_node_type
static const IRNodeType _node_type
Definition IR.h:209
Halide::Internal::Shuffle
Construct a new vector by taking elements from another sequence of vectors.
Definition IR.h:884
Halide::Internal::Shuffle::make_slice
static Expr make_slice(Expr vector, int begin, int stride, int size)
Convenience constructor for making a shuffle representing a contiguous subset of a vector.
Halide::Internal::Shuffle::is_interleave
bool is_interleave() const
Check if this shuffle is an interleaving of the vector arguments.
Halide::Internal::Shuffle::make_extract_element
static Expr make_extract_element(Expr vector, int i)
Convenience constructor for making a shuffle representing extracting a single element.
Halide::Internal::Shuffle::vector_and_lane_indices
std::vector< std::pair< int, int > > vector_and_lane_indices() const
Returns the sequence of vector and lane indices that represent each entry to be used for the shuffled...
Halide::Internal::Shuffle::is_extract_element
bool is_extract_element() const
Check if this shuffle is extracting a scalar from the vector arguments.
Halide::Internal::Shuffle::is_broadcast
bool is_broadcast() const
Check if this shuffle can be represented as a repeating pattern that repeats the same shuffle of the ...
Halide::Internal::Shuffle::make_concat
static Expr make_concat(const std::vector< Expr > &vectors)
Convenience constructor for making a shuffle representing a concatenation of the vectors.
Halide::Internal::Shuffle::make
static Expr make(const std::vector< Expr > &vectors, const std::vector< int > &indices)
Halide::Internal::Shuffle::broadcast_factor
int broadcast_factor() const
Halide::Internal::Shuffle::_node_type
static const IRNodeType _node_type
Definition IR.h:951
Halide::Internal::Shuffle::make_broadcast
static Expr make_broadcast(Expr vector, int factor)
Convenience constructor for making a shuffle representing a broadcast of a vector.
Halide::Internal::Shuffle::vectors
std::vector< Expr > vectors
Definition IR.h:885
Halide::Internal::Shuffle::is_concat
bool is_concat() const
Check if this shuffle is a concatenation of the vector arguments.
Halide::Internal::Shuffle::is_slice
bool is_slice() const
Check if this shuffle is a contiguous strict subset of the vector arguments, and if so,...
Halide::Internal::Shuffle::indices
std::vector< int > indices
Indices indicating which vector element to place into the result.
Definition IR.h:890
Halide::Internal::Shuffle::slice_stride
int slice_stride() const
Check if this shuffle is a contiguous strict subset of the vector arguments, and if so,...
Definition IR.h:938
Halide::Internal::Shuffle::make_interleave
static Expr make_interleave(const std::vector< Expr > &vectors)
Convenience constructor for making a shuffle representing an interleaving of vectors of the same leng...
Halide::Internal::Shuffle::slice_begin
int slice_begin() const
Check if this shuffle is a contiguous strict subset of the vector arguments, and if so,...
Definition IR.h:935
Halide::Internal::Stmt
A reference-counted handle to a statement node.
Definition Expr.h:427
Halide::Internal::StmtNode< LetStmt >::StmtNode
StmtNode()
Definition Expr.h:171
Halide::Internal::Store
Store a 'value' to the buffer called 'name' at a given 'index' if 'predicate' is true.
Definition IR.h:333
Halide::Internal::Store::index
Expr index
Definition IR.h:335
Halide::Internal::Store::name
std::string name
Definition IR.h:334
Halide::Internal::Store::_node_type
static const IRNodeType _node_type
Definition IR.h:346
Halide::Internal::Store::param
Parameter param
Definition IR.h:337
Halide::Internal::Store::alignment
ModulusRemainder alignment
Definition IR.h:341
Halide::Internal::Store::predicate
Expr predicate
Definition IR.h:335
Halide::Internal::Store::value
Expr value
Definition IR.h:335
Halide::Internal::Store::make
static Stmt make(const std::string &name, Expr value, Expr index, Parameter param, Expr predicate, ModulusRemainder alignment)
Halide::Internal::Sub
The difference of two expressions.
Definition IR.h:65
Halide::Internal::Sub::_node_type
static const IRNodeType _node_type
Definition IR.h:70
Halide::Internal::Sub::a
Expr a
Definition IR.h:66
Halide::Internal::Sub::make
static Expr make(Expr a, Expr b)
Halide::Internal::Sub::b
Expr b
Definition IR.h:66
Halide::Internal::Variable
A named variable.
Definition IR.h:801
Halide::Internal::Variable::make
static Expr make(Type type, const std::string &name, const Buffer<> &image)
Definition IR.h:822
Halide::Internal::Variable::make
static Expr make(Type type, const std::string &name, Parameter param)
Definition IR.h:818
Halide::Internal::Variable::make
static Expr make(Type type, const std::string &name, Buffer<> image, Parameter param, ReductionDomain reduction_domain)
Halide::Internal::Variable::image
Buffer image
References to properties of literal image parameters.
Definition IR.h:809
Halide::Internal::Variable::reduction_domain
ReductionDomain reduction_domain
Reduction variables hang onto their domains.
Definition IR.h:812
Halide::Internal::Variable::make
static Expr make(Type type, const std::string &name)
Definition IR.h:814
Halide::Internal::Variable::param
Parameter param
References to scalar parameters, or to the dimensions of buffer parameters hang onto those expression...
Definition IR.h:806
Halide::Internal::Variable::make
static Expr make(Type type, const std::string &name, ReductionDomain reduction_domain)
Definition IR.h:826
Halide::Internal::Variable::name
std::string name
Definition IR.h:802
Halide::Internal::Variable::_node_type
static const IRNodeType _node_type
Definition IR.h:833
Halide::Internal::VectorReduce
Horizontally reduce a vector to a scalar or narrower vector using the given commutative and associati...
Definition IR.h:1012
Halide::Internal::VectorReduce::_node_type
static const IRNodeType _node_type
Definition IR.h:1031
Halide::Internal::VectorReduce::make
static Expr make(Operator op, Expr vec, int lanes)
Halide::Internal::VectorReduce::value
Expr value
Definition IR.h:1026
Halide::Internal::VectorReduce::op
Operator op
Definition IR.h:1027
Halide::Internal::VectorReduce::Operator
Operator
Definition IR.h:1016
Halide::Internal::VectorReduce::Min
@ Min
Definition IR.h:1020
Halide::Internal::VectorReduce::Add
@ Add
Definition IR.h:1017
Halide::Internal::VectorReduce::And
@ And
Definition IR.h:1022
Halide::Internal::VectorReduce::Mul
@ Mul
Definition IR.h:1019
Halide::Internal::VectorReduce::Or
@ Or
Definition IR.h:1023
Halide::Internal::VectorReduce::Max
@ Max
Definition IR.h:1021
Halide::Internal::VectorReduce::SaturatingAdd
@ SaturatingAdd
Definition IR.h:1018
Halide::Type
Types in the halide type system.
Definition Type.h:283