https://github.com/halide/Halide
Raw File
Tip revision: 95a70e986b90cd205e650d182af92b249564a8f6 authored by Steven Johnson on 26 February 2024, 21:57:53 UTC
Merge remote-tracking branch 'origin/abadams/rewrite_atomic_pass' into srj/test8105a
Tip revision: 95a70e9
AlignLoads.h
#ifndef HALIDE_ALIGN_LOADS_H
#define HALIDE_ALIGN_LOADS_H

/** \file
 * Defines a lowering pass that rewrites unaligned loads into
 * sequences of aligned loads.
 */
#include "Expr.h"

namespace Halide {
namespace Internal {

/** Attempt to rewrite unaligned loads from buffers which are known to
 * be aligned to instead load aligned vectors that cover the original
 * load, and then slice the original load out of the aligned
 * vectors.
 *
 * Types that are less than min_bytes_to_align in size are not
 * rewritten. This is intended to make a distinction between data that
 * will be accessed as a scalar and that which will be accessed as a
 * vector.
 */
Stmt align_loads(const Stmt &s, int alignment, int min_bytes_to_align);

}  // namespace Internal
}  // namespace Halide

#endif
back to top