Halide 22.0.0 Halide compiler and libraries

Public Types | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Halide::Internal::VectorReduce Struct Reference

Horizontally reduce a vector to a scalar or narrower vector using the given commutative and associative binary operator. More...

`#include <IR.h>`

Inheritance diagram for Halide::Internal::VectorReduce:

## Public Types
enum | Operator { Add , SaturatingAdd , Mul , Min , Max , And , Or }

## Static Public Member Functions
static Expr | make (Operator op, Expr vec, int lanes)

## Public Attributes
Expr | value
Operator | op
Public Attributes inherited from Halide::Internal::BaseExprNode
Type | type
Public Attributes inherited from Halide::Internal::IRNode
RefCount | ref_count
| These classes are all managed with intrusive reference counting, so we also track a reference count. More...
IRNodeType | node_type
| Each IR node subclass has a unique identifier. More...

## Static Public Attributes
static const IRNodeType | _node_type = IRNodeType::VectorReduce

## Additional Inherited Members
Public Member Functions inherited from Halide::Internal::ExprNode< VectorReduce >
void | accept (IRVisitor *v) const override
| We use the visitor pattern to traverse IR nodes throughout the compiler, so we have a virtual accept method which accepts visitors. More...
Expr | mutate_expr (IRMutator *v) const override
| ExprNode ()
| ~ExprNode () override=default
Public Member Functions inherited from Halide::Internal::BaseExprNode
| BaseExprNode (IRNodeType t)
virtual Expr | mutate_expr (IRMutator *v) const =0
Public Member Functions inherited from Halide::Internal::IRNode
virtual void | accept (IRVisitor *v) const =0
| We use the visitor pattern to traverse IR nodes throughout the compiler, so we have a virtual accept method which accepts visitors. More...
| IRNode (IRNodeType t)
virtual | ~IRNode ()=default

## Detailed Description

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.

Definition at line 1026 of file IR.h.

## Member Enumeration Documentation

## ◆ Operator

enum Halide::Internal::VectorReduce::Operator

Enumerator
Add |
SaturatingAdd |
Mul |
Min |
Max |
And |
Or |

Definition at line 1030 of file IR.h.

## Member Function Documentation

## ◆ make()

static Expr Halide::Internal::VectorReduce::make | ( | Operator | op,
|  | Expr | vec,
|  | int | lanes
| ) |  |
| static

Referenced by Halide::Internal::IRMatcher::VectorReduceOp< A, B, reduce_op >::make().

## Member Data Documentation

## ◆ value

Expr Halide::Internal::VectorReduce::value

Definition at line 1040 of file IR.h.

Referenced by Halide::Internal::IRMatcher::VectorReduceOp< A, B, reduce_op >::match().

## ◆ op

Operator Halide::Internal::VectorReduce::op

Definition at line 1041 of file IR.h.

Referenced by Halide::Internal::IRMatcher::VectorReduceOp< A, B, reduce_op >::match().

## ◆ _node_type

const IRNodeType Halide::Internal::VectorReduce::_node_type = IRNodeType::VectorReduce
| static

Definition at line 1045 of file IR.h.

Referenced by Halide::Internal::IRMatcher::VectorReduceOp< A, B, reduce_op >::match().

The documentation for this struct was generated from the following file:

- src/IR.h