Halide  19.0.0
Halide compiler and libraries
CanonicalizeGPUVars.h
Go to the documentation of this file.
1 #ifndef HALIDE_CANONICALIZE_GPU_VARS_H
2 #define HALIDE_CANONICALIZE_GPU_VARS_H
3 
4 /** \file
5  * Defines the lowering pass that canonicalize the GPU var names over.
6  */
7 
8 #include "Expr.h"
9 
10 namespace Halide {
11 namespace Internal {
12 
13 /** Canonicalize GPU var names into some pre-determined block/thread names
14  * (i.e. __block_id_x, __thread_id_x, etc.). The x/y/z/w order is determined
15  * by the nesting order: innermost is assigned to x and so on. */
17 
18 /** Names for the thread and block id variables. Includes the leading
19  * dot. Indexed from inside out, so 0 gives you the innermost loop. */
20 // @{
21 const std::string &gpu_thread_name(int index);
22 const std::string &gpu_block_name(int index);
23 // @}
24 
25 } // namespace Internal
26 } // namespace Halide
27 
28 #endif
Base classes for Halide expressions (Halide::Expr) and statements (Halide::Internal::Stmt)
const std::string & gpu_block_name(int index)
Stmt canonicalize_gpu_vars(Stmt s)
Canonicalize GPU var names into some pre-determined block/thread names (i.e.
const std::string & gpu_thread_name(int index)
Names for the thread and block id variables.
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 reference-counted handle to a statement node.
Definition: Expr.h:427