Loading...
Searching...
No Matches
DistributeShifts.h
Go to the documentation of this file.
#ifndef HALIDE_DISTRIBUTE_SHIFTS_H
#define HALIDE_DISTRIBUTE_SHIFTS_H
/** \file
* A tool to distribute shifts as multiplies, useful for some backends. (e.g. ARM, HVX).
*/
#include "IR.h"
namespace Halide {
namespace Internal {
// Distributes shifts as multiplies. If `multiply_adds` is set,
// then only distributes the patterns `a + widening_shl(b, c)` /
// `a - widening_shl(b, c)` and `a + b << c` / `a - b << c`, to
// produce `a (+/-) widening_mul(b, 1 << c)` and `a (+/-) b * (1 << c)`,
// respectively
Stmt distribute_shifts(const Stmt &stmt, bool multiply_adds);
} // namespace Internal
} // namespace Halide
#endif
IR.h
Subtypes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt).
Halide::Internal
Definition AbstractGenerator.h:24
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::OutputFileType::stmt
@ stmt
Definition Module.h:43
Halide::Internal::Stmt
A reference-counted handle to a statement node.
Definition Expr.h:427