Halide 16.0.0
Halide compiler and libraries
GPULoopInfo.h
Go to the documentation of this file.
1#ifndef GPU_LOOP_INFO_H
2#define GPU_LOOP_INFO_H
3
4/** \file
5 *
6 * Data structure containing information about the current GPU loop nest
7 * hierarchy of blocks, threads, etc. Useful when computing GPU features
8 */
9
10#include <vector>
11
12#include "Halide.h"
13#include "ThreadInfo.h"
14
15namespace Halide {
16namespace Internal {
17namespace Autoscheduler {
18
19struct LoopNest;
20
23 : root{root} {
24 }
25
26 const LoopNest *root = nullptr;
27 const LoopNest *current_block_loop = nullptr;
28 const LoopNest *current_thread_loop = nullptr;
29 std::vector<const LoopNest *> inner_loop_stack;
33 const ThreadInfo *thread_info = nullptr;
34
35 void update(const Target &target, const LoopNest *loop);
36
38
39 bool at_or_inside_block() const;
40
41 bool at_or_inside_thread() const;
42
43 std::vector<int64_t> get_inner_serial_loop_extents(const LoopNest *loop_nest) const;
44
45 std::unique_ptr<ThreadInfo> create_thread_info();
46
48};
49
50} // namespace Autoscheduler
51} // namespace Internal
52} // namespace Halide
53
54#endif // GPU_LOOP_INFO_H
Data structure containing information about GPU threads for a particular location in the loop nest an...
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
@ Internal
Not visible externally, similar to 'static' linkage in C.
signed __INT64_TYPE__ int64_t
int64_t get_total_inner_serial_extents_outside_realization(const LoopNest *loop_nest) const
std::unique_ptr< ThreadInfo > create_thread_info()
void update(const Target &target, const LoopNest *loop)
std::vector< const LoopNest * > inner_loop_stack
Definition: GPULoopInfo.h:29
std::vector< int64_t > get_inner_serial_loop_extents(const LoopNest *loop_nest) const
A struct representing a target machine and os to generate code for.
Definition: Target.h:19