Loading...
Searching...
No Matches
Deinterleave.h
Go to the documentation of this file.
#ifndef DEINTERLEAVE_H
#define DEINTERLEAVE_H
/** \file
*
* Defines methods for splitting up a vector into the even lanes and
* the odd lanes. Useful for optimizing expressions such as select(x %
* 2, f(x/2), g(x/2))
*/
#include "Expr.h"
namespace Halide {
namespace Internal {
/** Extract the odd-numbered lanes in a vector */
Expr extract_odd_lanes(const Expr &a);
/** Extract the even-numbered lanes in a vector */
Expr extract_even_lanes(const Expr &a);
/** Extract the nth lane of a vector */
Expr extract_lane(const Expr &vec, int lane);
/** Look through a statement for expressions of the form select(ramp %
* 2 == 0, a, b) and replace them with calls to an interleave
* intrinsic */
Stmt rewrite_interleavings(const Stmt &s);
void deinterleave_vector_test();
} // namespace Internal
} // namespace Halide
#endif
Expr.h
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt).
Halide::Internal
Definition AbstractGenerator.h:24
Halide::Internal::extract_lane
Expr extract_lane(const Expr &vec, int lane)
Extract the nth lane of a vector.
Halide::Internal::deinterleave_vector_test
void deinterleave_vector_test()
Halide::Internal::extract_odd_lanes
Expr extract_odd_lanes(const Expr &a)
Extract the odd-numbered lanes in a vector.
Halide::Internal::rewrite_interleavings
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...
Halide::Internal::extract_even_lanes
Expr extract_even_lanes(const Expr &a)
Extract the even-numbered lanes in a vector.
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition AbstractGenerator.h:19
Halide::Expr
A fragment of Halide syntax.
Definition Expr.h:258
Halide::Internal::Stmt
A reference-counted handle to a statement node.
Definition Expr.h:427