Halide 19.0.0
Halide compiler and libraries
Loading...
Searching...
No Matches
Deinterleave.h
Go to the documentation of this file.
1#ifndef DEINTERLEAVE_H
2#define DEINTERLEAVE_H
3
4/** \file
5 *
6 * Defines methods for splitting up a vector into the even lanes and
7 * the odd lanes. Useful for optimizing expressions such as select(x %
8 * 2, f(x/2), g(x/2))
9 */
10
11#include "Expr.h"
12
13namespace Halide {
14namespace Internal {
15
16/** Extract the odd-numbered lanes in a vector */
18
19/** Extract the even-numbered lanes in a vector */
21
22/** Extract the nth lane of a vector */
23Expr extract_lane(const Expr &vec, int lane);
24
25/** Look through a statement for expressions of the form select(ramp %
26 * 2 == 0, a, b) and replace them with calls to an interleave
27 * intrinsic */
29
31
32} // namespace Internal
33} // namespace Halide
34
35#endif
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
Expr extract_lane(const Expr &vec, int lane)
Extract the nth lane of a vector.
void deinterleave_vector_test()
Expr extract_odd_lanes(const Expr &a)
Extract the odd-numbered lanes in a vector.
Stmt rewrite_interleavings(const Stmt &s)
Look through a statement for expressions of the form select(ramp % 2 == 0, a, b) and replace them wit...
Expr extract_even_lanes(const Expr &a)
Extract the even-numbered lanes in a vector.
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
@ Internal
Not visible externally, similar to 'static' linkage in C.
A fragment of Halide syntax.
Definition Expr.h:258
A reference-counted handle to a statement node.
Definition Expr.h:427