Halide 22.0.0 Halide compiler and libraries

Loading...
Searching...
No Matches
DistributeShifts.h
Go to the documentation of this file.
1#ifndef HALIDE_DISTRIBUTE_SHIFTS_H
2#define HALIDE_DISTRIBUTE_SHIFTS_H
3
4/** \file
5 * A tool to distribute shifts as multiplies, useful for some backends. (e.g. ARM, HVX).
6 */
7
8#include "IR.h"
9
10 namespace Halide {
11 namespace Internal {
12
13// Distributes shifts as multiplies. If `multiply_adds` is set,
14// then only distributes the patterns `a + widening_shl(b, c)` /
15// `a - widening_shl(b, c)` and `a + b << c` / `a - b << c`, to
16// produce `a (+/-) widening_mul(b, 1 << c)` and `a (+/-) b * (1 << c)`,
17// respectively
18 Stmt distribute_shifts(const Stmt &stmt, bool multiply_adds);
19
20} // namespace Internal
21} // namespace Halide
22
23#endif
IR.h
Subtypes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
Halide::Internal::distribute_shifts
Stmt distribute_shifts(const Stmt &stmt, bool multiply_adds)
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition AbstractGenerator.h:19
Halide::LinkageType::Internal
@ Internal
Not visible externally, similar to 'static' linkage in C.
Halide::OutputFileType::stmt
@ stmt
Halide::cast
Internal::ConstantInterval cast(Type t, const Internal::ConstantInterval &a)
Cast operators for ConstantIntervals.
Halide::Internal::Stmt
A reference-counted handle to a statement node.
Definition Expr.h:427