Halide
PrefetchDirective.h
Go to the documentation of this file.
1 #ifndef HALIDE_PREFETCH_DIRECTIVE_H
2 #define HALIDE_PREFETCH_DIRECTIVE_H
3 
4 /** \file
5  * Defines the PrefetchDirective struct
6  */
7 
8 #include <string>
9 
10 #include "Expr.h"
11 #include "Parameter.h"
12 
13 namespace Halide {
14 
15 /** Different ways to handle accesses outside the original extents in a prefetch. */
17  /** Clamp the prefetched exprs by intersecting the prefetched region with
18  * the original extents. This may make the exprs of the prefetched region
19  * more complicated. */
20  Clamp,
21 
22  /** Guard the prefetch with if-guards that ignores the prefetch if
23  * any of the prefetched region ever goes beyond the original extents
24  * (i.e. all or nothing). */
26 
27  /** Leave the prefetched exprs as are (no if-guards around the prefetch
28  * and no intersecting with the original extents). This makes the prefetch
29  * exprs simpler but this may cause prefetching of region outside the original
30  * extents. This is good if prefetch won't fault when accessing region
31  * outside the original extents. */
33 };
34 
35 namespace Internal {
36 
38  std::string name;
39  std::string var;
42  // If it's a prefetch load from an image parameter, this points to that.
44 };
45 
46 } // namespace Internal
47 
48 } // namespace Halide
49 
50 #endif // HALIDE_PREFETCH_DIRECTIVE_H
Parameter.h
Halide::Internal::Parameter
A reference-counted handle to a parameter to a halide pipeline.
Definition: Parameter.h:28
Halide::PrefetchBoundStrategy::GuardWithIf
@ GuardWithIf
Guard the prefetch with if-guards that ignores the prefetch if any of the prefetched region ever goes...
Halide::Internal::PrefetchDirective::name
std::string name
Definition: PrefetchDirective.h:38
Halide
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
Definition: AddAtomicMutex.h:21
Halide::PrefetchBoundStrategy::NonFaulting
@ NonFaulting
Leave the prefetched exprs as are (no if-guards around the prefetch and no intersecting with the orig...
Halide::PrefetchBoundStrategy::Clamp
@ Clamp
Clamp the prefetched exprs by intersecting the prefetched region with the original extents.
Halide::Internal::PrefetchDirective::param
Parameter param
Definition: PrefetchDirective.h:43
Halide::Internal::PrefetchDirective::strategy
PrefetchBoundStrategy strategy
Definition: PrefetchDirective.h:41
Expr.h
Halide::Internal::PrefetchDirective
Definition: PrefetchDirective.h:37
Halide::Internal::PrefetchDirective::offset
Expr offset
Definition: PrefetchDirective.h:40
Halide::PrefetchBoundStrategy
PrefetchBoundStrategy
Different ways to handle accesses outside the original extents in a prefetch.
Definition: PrefetchDirective.h:16
Halide::Expr
A fragment of Halide syntax.
Definition: Expr.h:256
Halide::Internal::PrefetchDirective::var
std::string var
Definition: PrefetchDirective.h:39