397 const std::vector<Expr> &
extents,
449 static Stmt make(
const std::vector<Stmt> &stmts);
716 bool is_intrinsic(std::initializer_list<IntrinsicOp> intrinsics)
const {
734 if (c->is_intrinsic(i)) {
850 const std::vector<int> &
indices);
std::vector< Range > Region
A multi-dimensional box.
static const IRNodeType _node_type
static const IRNodeType _node_type
static Expr make(Expr a, Expr b)
static const IRNodeType _node_type
bool is_unordered_parallel(ForType for_type)
Check if for_type executes for loop iterations in parallel and unordered.
static const IRNodeType _node_type
static Stmt make(const std::string &name, Stmt body)
The actual IR nodes begin here.
static Stmt make(const std::string &name)
bool is_reinterpret() const
Check if the cast is equivalent to a reinterpret.
A fragment of Halide syntax.
bool is_slice() const
Check if this shuffle is a contiguous strict subset of the vector arguments, and if so...
static Expr make(Type type, const std::string &name, const Buffer<> &image)
static Expr make(Expr condition, Expr true_value, Expr false_value)
Is the first expression greater than the second.
A reference-counted handle to a statement node.
The result of modulus_remainder analysis.
Routines for statically determining what expressions are divisible by.
static const IRNodeType _node_type
Defines the PrefetchDirective struct.
static HALIDE_EXPORT ConstString buffer_init_from_buffer
static const IRNodeType _node_type
static HALIDE_EXPORT ConstString buffer_set_bounds
static Stmt make(const std::string &name, Expr value, Expr index, Parameter param, Expr predicate, ModulusRemainder alignment)
bool is_concat() const
Check if this shuffle is a concatenation of the vector arguments.
Load a value from a named symbol if predicate is true.
static const IRNodeType _node_type
static HALIDE_EXPORT ConstString buffer_set_host_dirty
The difference of two expressions.
static const IRNodeType _node_type
We use the "curiously recurring template pattern" to avoid duplicated code in the IR Nodes...
A vector with 'lanes' elements, in which every element is 'value'.
Partition
Different ways to handle loops with a potentially optimizable boundary conditions.
static HALIDE_EXPORT ConstString trace
static HALIDE_EXPORT ConstString buffer_crop
static Expr make(Expr a, Expr b)
Logical and - are both expressions true.
A possibly-weak pointer to a Halide function.
static Expr make(Expr a, Expr b)
static const char * get_intrinsic_name(IntrinsicOp op)
static const IRNodeType _node_type
Logical not - true if the expression false.
Horizontally reduce a vector to a scalar or narrower vector using the given commutative and associati...
Is the first expression less than the second.
static Expr make(const Buffer<> &image, const std::vector< Expr > &args)
Convenience constructor for loads from concrete images.
The product of two expressions.
A reference-counted handle to a parameter to a halide pipeline.
static HALIDE_EXPORT ConstString buffer_get_dimensions
Lock all the Store nodes in the body statement.
static Stmt make(Expr semaphore, Expr count, Stmt body)
static HALIDE_EXPORT ConstString buffer_get_type
The sum of two expressions.
static Expr make(Expr a, Expr b)
A linear ramp vector node.
Partition partition_policy
Parameter param
References to scalar parameters, or to the dimensions of buffer parameters hang onto those expression...
static HALIDE_EXPORT ConstString buffer_get_host_dirty
Defines the Partition enum.
static Expr make(Operator op, Expr vec, int lanes)
static const IRNodeType _node_type
Allocate a multi-dimensional buffer of the given type and size.
static const IRNodeType _node_type
This file defines the class FunctionDAG, which is our representation of a Halide pipeline, and contains methods to using Halide's bounds tools to query properties of it.
static const IRNodeType _node_type
static const IRNodeType _node_type
const std::string & name() const
Buffers are optionally named.
static Expr make(Expr a, Expr b)
static Stmt make(const std::string &name, Expr value, Stmt body)
bool is_parallel(ForType for_type)
Returns true if for_type executes for loop iterations in parallel.
static Expr make(Type t, Expr v)
static Stmt make(const std::string &producer_name, const std::string &mutex_name, Stmt body)
Store a 'value' to the buffer called 'name' at a given 'index' if 'predicate' is true.
Allocate a scratch area called with the given name, type, and size.
static Expr make(Type type, const std::string &name)
IRNodeType
All our IR node types get unique IDs for the purposes of RTTI.
static const IRNodeType _node_type
bool is_unordered_parallel() const
static const IRNodeType _node_type
Is the first expression greater than or equal to the second.
int slice_stride() const
Check if this shuffle is a contiguous strict subset of the vector arguments, and if so...
A possibly-side-effecty compiler intrinsic, which has special handling during codegen.
static Expr make(Expr value, int lanes)
static Expr make(Type type, const std::string &name, ReductionDomain reduction_domain)
static const IRNodeType _node_type
static const IRNodeType _node_type
static Stmt make(Expr condition, Expr message)
static const IRNodeType _node_type
static const IRNodeType _node_type
static const IRNodeType _node_type
static HALIDE_EXPORT ConstString buffer_get_min
This defines the value of a function at a multi-dimensional location.
Represent a multi-dimensional region of a Func or an ImageParam that needs to be prefetched.
static HALIDE_EXPORT ConstString buffer_get_stride
The ratio of two expressions.
static Expr make(Expr a, Expr b)
A call to an external C-ABI function, possibly with side-effects.
static Stmt make(const std::string &name, Expr min, Expr extent, ForType for_type, Partition partition_policy, DeviceAPI device_api, Stmt body)
static const IRNodeType _node_type
static HALIDE_EXPORT ConstString buffer_get_device_interface
static Expr make_extract_element(Expr vector, int i)
Convenience constructor for making a shuffle representing extracting a single element.
static Expr make(Expr a, Expr b)
A side-effect-free version of the above.
std::vector< Expr > vectors
HALIDE_ALWAYS_INLINE Type type() const
Get the type of this expression node.
bool is_pure() const
Check if a call node is pure within a pipeline, meaning that the same args always give the same resul...
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt) ...
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...
std::vector< Expr > values
static HALIDE_EXPORT ConstString buffer_get_device_dirty
std::vector< Expr > extents
static Stmt make(const std::string &name, const std::vector< Type > &types, MemoryType memory_type, const Region &bounds, Expr condition, Stmt body)
static Expr make(Expr a, Expr b)
A call to an external C-ABI function, possibly with side-effects.
static const IRNodeType _node_type
static Expr make(Type type, const std::string &name, Parameter param)
Is the first expression less than or equal to the second.
static Expr make(Expr a, Expr b)
A call to a guaranteed-side-effect-free external function.
HALIDE_ALWAYS_INLINE int bits() const
Return the bit size of a single element of this type.
Is the first expression not equal to the second.
static const IRNodeType _node_type
const std::string & name() const
Get the name of this parameter.
const T * as() const
Downcast this ir node to its actual type (e.g.
static Expr make(Expr a, Expr b)
static HALIDE_EXPORT ConstString buffer_init
static const IRNodeType _node_type
std::string producer_name
Buffer image
References to properties of literal image parameters.
If the 'condition' is false, then evaluate and return the message, which should be a call to an error...
static Stmt make(const std::string &name, const std::vector< Type > &types, const Region &bounds, const PrefetchDirective &prefetch, Expr condition, Stmt body)
Not visible externally, similar to 'static' linkage in C.
HALIDE_ALWAYS_INLINE bool is_int_or_uint() const
Is this type an integer type of any sort?
static Expr make(Expr a, Expr b)
Is the first expression equal to the second.
int broadcast_factor() const
static const IRNodeType _node_type
static const IRNodeType _node_type
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())
Represents a location where storage will be hoisted to for a Func / Realize node with a given name...
The greater of two values.
A pair of statements executed concurrently.
static const Call * as_tag(const Expr &e)
bool is_extract_element() const
Check if this shuffle is extracting a scalar from the vector arguments.
static const IRNodeType _node_type
Defines the internal representation of parameters to halide piplines.
static Stmt make(const std::string &name, const std::vector< Expr > &values, const std::vector< Expr > &args, const Expr &predicate)
std::string free_function
static HALIDE_EXPORT ConstString buffer_get_device
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)
bool is_intrinsic(IntrinsicOp op) const
std::vector< Type > types
ForType
An enum describing a type of loop traversal.
static const IRNodeType _node_type
static Expr make_concat(const std::vector< Expr > &vectors)
Convenience constructor for making a shuffle representing a concatenation of the vectors.
A let expression, like you might find in a functional language.
std::vector< int > indices
Indices indicating which vector element to place into the result.
static const IRNodeType _node_type
Free the resources associated with the given buffer.
static const IRNodeType _node_type
ModulusRemainder alignment
ModulusRemainder alignment
static Expr make(Expr a, Expr b)
static HALIDE_EXPORT ConstString buffer_get_shape
A reference-counted handle to Halide's internal representation of a function.
static const IRNodeType _node_type
Types in the halide type system.
bool is_intrinsic() const
static Expr make(Expr a, Expr b)
static Expr make(Type type, const std::string &name, Expr index, Buffer<> image, Parameter param, Expr predicate, ModulusRemainder alignment)
static const IRNodeType _node_type
static Stmt make(Stmt first, Stmt rest)
A reference-counted handle on a reduction domain, which is just a vector of ReductionVariable.
static Stmt make_consume(const std::string &name, Stmt body)
static HALIDE_EXPORT ConstString buffer_get_extent
static Expr make(Expr a, Expr b)
A sequence of statements to be executed in-order.
static Expr make_interleave(const std::vector< Expr > &vectors)
Convenience constructor for making a shuffle representing an interleaving of vectors of the same leng...
static HALIDE_EXPORT ConstString buffer_set_device_dirty
static Expr make(const std::vector< Expr > &vectors, const std::vector< int > &indices)
static const IRNodeType _node_type
static HALIDE_EXPORT ConstString buffer_get_max
The lesser of two values.
static Stmt make(Stmt first, Stmt rest)
static HALIDE_EXPORT ConstString buffer_get_host
static const IRNodeType _node_type
static Expr make(const std::string &name, Expr value, Expr body)
static Stmt make(Expr condition, Stmt then_case, Stmt else_case=Stmt())
bool is_interleave() const
Check if this shuffle is an interleaving of the vector arguments.
static const IRNodeType _node_type
static const IRNodeType _node_type
static const IRNodeType _node_type
static const IRNodeType _node_type
static Expr make(Type t, Expr v)
Reinterpret value as another type, without affecting any of the bits (on little-endian systems)...
static const IRNodeType _node_type
ReductionDomain reduction_domain
Reduction variables hang onto their domains.
static const IRNodeType _node_type
The statement form of a let node.
static Stmt make_produce(const std::string &name, Stmt body)
static Expr make(Expr base, Expr stride, int lanes)
static const IRNodeType _node_type
static const IRNodeType _node_type
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...
static Expr make_broadcast(Expr vector, int factor)
Convenience constructor for making a shuffle representing a broadcast of a vector.
static HALIDE_EXPORT ConstString buffer_is_bounds_query
static Expr make(const Parameter ¶m, const std::vector< Expr > &args)
Convenience constructor for loads from images parameters.
Defines internal classes related to Reduction Domains.
static Expr make(Expr a, Expr b)
DeviceAPI
An enum describing a type of device API.
static const IRNodeType _node_type
std::vector< Type > types
Logical or - is at least one of the expression true.
A load from an input image.
PrefetchDirective prefetch
This node is a helpful annotation to do with permissions.
static const IRNodeType _node_type
Type type() const
Get the type of this parameter.
signed __INT32_TYPE__ int32_t
bool is_broadcast() const
Check if this shuffle can be represented as a broadcast.
const char *const ConstString
int32_t constant_allocation_size() const
static Stmt make(const std::string &name, bool is_producer, Stmt body)
int slice_begin() const
Check if this shuffle is a contiguous strict subset of the vector arguments, and if so...
Type type() const
Does the same thing as the equivalent Halide::Runtime::Buffer method.
Evaluate and discard an expression, presumably because it has some side-effect.
Construct a new vector by taking elements from another sequence of vectors.
MemoryType
An enum describing different address spaces to be used with Func::store_in.
bool is_intrinsic(std::initializer_list< IntrinsicOp > intrinsics) const